Exemplo n.º 1
0
def test_load():
    """
    Check that the loader works
    """
    s = mySwitchLoader.mySwitchLoader()
    s.build()
    s.list()
    instances = s.instances()
    assert len(instances) > 0
Exemplo n.º 2
0
def test_HWOK():
    """
    Check that the errors can be checked and reset on
    each sensor
    """
    allS = mySwitchLoader.mySwitchLoader()
    allS.build()
    for sname, sobj in allS.instances().iteritems():
        print sname, sobj.HWOK()
        assert not sobj.HWOK()
Exemplo n.º 3
0
def test_on():
    """
    Check that the errors can be checked and reset on
    each sensor
    """
    allS = mySwitchLoader.mySwitchLoader()
    allS.build()
    for sname, sobj in allS.instances().iteritems():
        sobj.on()
        sobj.off()
        assert not sobj.hasError()