Example #1
0
def test_ProtocolsIcmpTimeout():
    c = ContextConfig(IConfig("example.json"))
    c.GetWorkingConfigClass(True)
    c.ReadConfig()

    if c.configuration.protocols.icmp.timeout == 0:
        assert True
Example #2
0
def test_LoadConfigTwice():
    c = ContextConfig(IConfig('example.json'))
    c.GetWorkingConfigClass(True)
    c.ReadConfig()
    c.ReadConfig()

    if c.configuration.nodes.__len__() == 4:
        assert True
Example #3
0
def test_FindValidClassToInject():
    c = ContextConfig(IConfig("example.json"))
    c.GetWorkingConfigClass(True)
    c.ReadConfig()

    if c.configuration.sleepInterval.minutes == 2:
        assert True

    pass
Example #4
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