Пример #1
0
class TestRemove(unittest.TestCase):
    def setUp(self):
        self.sf = SignalFilter("me")
        self.tv = voo()
    def tRemoveNothing(self):
        try:
            self.sf.remove()
        except TypeError, _e:
            assert True
        else:
Пример #2
0
class TestStatus(unittest.TestCase):
    def setUp(self):
        self.sf = SignalFilter("me")
        self.tv = voo()
    def tStatusWithArgs(self):
        try:
            self.sf.status("hello")
        except TypeError, _e:
            assert True
        else:
Пример #3
0
class TestQuery(unittest.TestCase):
    def setUp(self):
        self.sf = SignalFilter("me")
        self.ns = voo()
        self.filter = aFilter()
    def testQueryNothing(self):
        try:
            self.sf.query()
        except TypeError, _e:
            assert True
        else:
Пример #4
0
class TestMute(unittest.TestCase):
    def setUp(self):
        self.sf = SignalFilter("me")
        self.tv = voo()
        self.filter = aFilter()
        self.invalidMuteValue = ~eMute.ON
        assert not eMute.isValid(self.invalidMuteValue)
    def testMuteNothing(self):
        try:
            self.sf.mute()
        except TypeError, _e:
            assert True
        else:
Пример #5
0
class TestGlobalEnable(unittest.TestCase):
    def setUp(self):
        self.sf = SignalFilter("me")
        self.invalidEnabler = ~eGlobalEnable.ON
        assert not eGlobalEnable.isValid(self.invalidEnabler)
    def testInvalidEnabler(self):
        item = "hello"
        try:
            self.sf.globalEnable(item)
        except ApiParamError, e:
            assert e.item == item
            assert eGlobalEnable in e.allowedTypes
            assert len(e.allowedTypes) == 1
        else:
Пример #6
0
class TestMuteAll(unittest.TestCase):
    def setUp(self):
        self.sf = SignalFilter("me")
        self.tv = voo()
    def tNoValue(self):
        assert(self.sf.muteAll(), iApiAction)
    def tMuteOn(self):
        assert(self.sf.muteAll(eMute.ON), iApiAction)
    def tMuteOff(self):
        assert(self.sf.muteAll(eMute.OFF), iApiAction)
    def tInvalidValue(self):
        muteValue = ~eMute.ON
        assert not eMute.isValid(muteValue)
        try:
            self.sf.muteAll(muteValue)
        except ApiParamError, e:
            assert e.item == muteValue
            assert eMute in e.allowedTypes
        else:
Пример #7
0
 def setUp(self):
     self.sf = SignalFilter("me")
     self.tv = voo()
Пример #8
0
 def setUp(self):
     self.sf = SignalFilter("me")
     self.ns = voo()
     self.filter = aFilter()
Пример #9
0
 def setUp(self):
     self.sf = SignalFilter("me")
     self.invalidEnabler = ~eGlobalEnable.ON
     assert not eGlobalEnable.isValid(self.invalidEnabler)
Пример #10
0
 def testNs(self):
     sf = SignalFilter("me")
     eNs = "me.signalfilter"
     assert sf._getNamespace() == eNs, "Got: %(NS)s" % {"NS":eNs}
Пример #11
0
 def setUp(self):
     self.sf = SignalFilter("me")
     self.tv = voo()
     self.filter = aFilter()
     self.invalidMuteValue = ~eMute.ON
     assert not eMute.isValid(self.invalidMuteValue)