Exemple #1
0
 def test_delay_over_60(self):
     cfile = create_config(("timeout=70", "delay=70"))
     conf = Config(cfile).load()
     with pytest.raises(ConfigException):
         conf.test_delay()
     assert conf.delay is 70
Exemple #2
0
 def test_delay_longer_than_timeout(self):
     cfile = create_config(("timeout=10", "delay=20"))
     conf = Config(cfile).load()
     with pytest.raises(ConfigException):
         assert conf.test_delay()
     assert conf.delay > conf.timeout
Exemple #3
0
 def test_no_delay(self):
     cfile = create_config(("",))
     conf = Config(cfile).load()
     assert conf.test_delay() is None
     assert conf.delay is None
Exemple #4
0
 def test_delay_over_60(self):
     cfile = create_config(("timeout=70", "delay=70"))
     conf = Config(cfile).load()
     with pytest.raises(ConfigException):
         conf.test_delay()
     assert conf.delay is 70
Exemple #5
0
 def test_delay_longer_than_timeout(self):
     cfile = create_config(("timeout=10", "delay=20"))
     conf = Config(cfile).load()
     with pytest.raises(ConfigException):
         assert conf.test_delay()
     assert conf.delay > conf.timeout
Exemple #6
0
 def test_no_delay(self):
     cfile = create_config(("", ))
     conf = Config(cfile).load()
     assert conf.test_delay() is None
     assert conf.delay is None