def test_NewConfig(): j = JsonConfig(IConfig("delete.json")) c = ContextConfig(j) c.NewConfig() c.ReadConfig() os.remove("delete.json") if c.configuration.sleepInterval.minutes == 2: assert True pass
def test_ProtocolsIcmpTimeoutNewConfig(): f = 'delete.yaml' try: os.remove(f) except: pass c = ContextConfig(IConfig(f)) c.GetWorkingConfigClass(True) c.NewConfig() c.ReadConfig() os.remove(f) if c.configuration.protocols.icmp.timeout == 0: assert True
def test_GenerateNewYaml(): f = 'delete.yaml' try: os.remove(f) except: pass i = IConfig(f) y = YamlConfig(i) c = ContextConfig(y) c.NewConfig() c.ReadConfig() os.remove(f) if c.configuration.sleepInterval.minutes == 2: assert True pass