Exemplo n.º 1
0
 def test_miss(self):
     assert_raises(KeyError, self.context.__getitem__, 'your_mom')
Exemplo n.º 2
0
 def test_valid_daily_scheduler_invalid_start_time(self):
     assert_raises(ConfigError, self.validate, "5 MWF")
     assert_raises(ConfigError, self.validate, "05:30:45:45 MWF")
     assert_raises(ConfigError, self.validate, "25:30:45 MWF")
Exemplo n.º 3
0
 def test__getitem__last_success_bad_date_name(self):
     name = "first_success#shortdate-1"
     assert_raises(KeyError, lambda: self.context[name])
Exemplo n.º 4
0
 def test__getitem__missing(self):
     assert_raises(KeyError, lambda: self.context['bogus'])
Exemplo n.º 5
0
 def test_valid_interval_scheduler_underscore(self):
     assert_raises(ConfigError, self.validate, "6_minute")
Exemplo n.º 6
0
 def test_remove_missing(self):
     assert_raises(ValueError, self.collection.remove, 'name')
Exemplo n.º 7
0
 def test_validate_bounds(self):
     assert_equal(self.parser.validate_bounds(0), 0)
     assert_equal(self.parser.validate_bounds(59), 59)
     assert_raises(ValueError, self.parser.validate_bounds, 60)
Exemplo n.º 8
0
 def test_valid_interval_scheduler_invalid_tokens(self):
     assert_raises(ConfigError, self.validate, "6 hours 22 minutes")
Exemplo n.º 9
0
 def test_valid_interval_scheduler_unicode(self):
     assert_raises(ConfigError, self.validate, "6 \x0e\x96minute")
Exemplo n.º 10
0
 def test_convert_predefined_invalid(self):
     assert_raises(ValueError, crontab.convert_predefined, '@bogus')
Exemplo n.º 11
0
 def test_valid_interval_scheduler_underscore(self):
     assert_raises(ConfigError, self.validate, "6_minute")
Exemplo n.º 12
0
 def test_valid_interval_scheduler_bogus(self):
     assert_raises(ConfigError, self.validate, "asdasd.asd")
Exemplo n.º 13
0
 def test_valid_interval_scheduler_unknown_unit(self):
     assert_raises(ConfigError, self.validate, "22 beats")
Exemplo n.º 14
0
 def test__getitem__miss(self):
     assert_raises(KeyError, lambda: self.action_graph['unknown'])
Exemplo n.º 15
0
 def test__getitem__last_success_bad_date_name(self):
     name = "first_success#shortdate-1"
     assert_raises(KeyError, lambda: self.context[name])
Exemplo n.º 16
0
 def test_convert_predefined_invalid(self):
     assert_raises(ValueError, crontab.convert_predefined, '@bogus')
Exemplo n.º 17
0
 def test__getitem__last_success_no_date_spec(self):
     name = "last_success"
     assert_raises(KeyError, lambda: self.context[name])
Exemplo n.º 18
0
 def test_valid_interval_scheduler_bogus(self):
     assert_raises(ConfigError, self.validate, "asdasd.asd")
Exemplo n.º 19
0
 def test__getitem__missing(self):
     assert_raises(KeyError, lambda: self.context['bogus'])
Exemplo n.º 20
0
 def test_valid_interval_scheduler_unicode(self):
     assert_raises(ConfigError, self.validate, "6 \x0e\x96minute")
Exemplo n.º 21
0
 def test__getitem__(self):
     assert_raises(KeyError, self.context.__getitem__, 'foo')
Exemplo n.º 22
0
 def test_single_instance(self):
     assert_raises(ValueError, node.NodePoolRepository)
     assert self.repo is node.NodePoolRepository.get_instance()
Exemplo n.º 23
0
 def test_miss(self):
     assert_raises(KeyError, self.context.__getitem__, 'your_mom')
Exemplo n.º 24
0
 def test__getitem__last_success_no_date_spec(self):
     name = "last_success"
     assert_raises(KeyError, lambda: self.context[name])
Exemplo n.º 25
0
 def test_valid_daily_scheduler_invalid_start_time(self):
     assert_raises(ConfigError, self.validate, "5 MWF")
     assert_raises(ConfigError, self.validate, "05:30:45:45 MWF")
     assert_raises(ConfigError, self.validate, "25:30:45 MWF")
Exemplo n.º 26
0
 def test__getitem__(self):
     assert_raises(KeyError, self.context.__getitem__, 'foo')
Exemplo n.º 27
0
 def test_valid_daily_scheduler_invalid_days(self):
     assert_raises(ConfigError, self.validate, "SUG")
     assert_raises(ConfigError, self.validate, "3")
Exemplo n.º 28
0
 def test_invalid_config(self):
     assert_raises(ConfigError, self.validate, '* * *')
Exemplo n.º 29
0
 def test_invalid_config(self):
     assert_raises(ConfigError, self.validate, '* * *')
Exemplo n.º 30
0
 def test_valid_daily_scheduler_invalid_days(self):
     assert_raises(ConfigError, self.validate, "SUG")
     assert_raises(ConfigError, self.validate, "3")
Exemplo n.º 31
0
 def test_valid_interval_scheduler_invalid_tokens(self):
     assert_raises(ConfigError, self.validate, "6 hours 22 minutes")
Exemplo n.º 32
0
 def test__getattr__missing_attribute(self):
     assert_raises(
         AttributeError,
         self.action_run.__getattr__,
         'is_not_a_real_state',
     )
Exemplo n.º 33
0
 def test_valid_interval_scheduler_unknown_unit(self):
     assert_raises(ConfigError, self.validate, "22 beats")
Exemplo n.º 34
0
 def test_validate_bounds(self):
     assert_equal(self.parser.validate_bounds(0), 0)
     assert_equal(self.parser.validate_bounds(59), 59)
     assert_raises(ValueError, self.parser.validate_bounds, 60)
Exemplo n.º 35
0
 def test_perform_not_defined(self):
     assert_raises(AttributeError, self.dummy.proxy.perform, 'zzz')