Beispiel #1
0
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
Beispiel #2
0
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
Beispiel #3
0
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