示例#1
0
    def test014_setSignal(self):
        # Correct (str, unicode, None)
        tiipMessage = TIIPMessage()
        tiipMessage.sig = str(self.signal)
        self.assertEquals(tiipMessage.sig, self.signal)
        tiipMessage.sig = self.signal
        self.assertEquals(tiipMessage.sig, self.signal)
        tiipMessage.sig = None
        self.assertEquals(tiipMessage.sig, None)

        # Incorrect
        with self.assertRaises(TypeError):
            tiipMessage.sig = 1
示例#2
0
    def test014_setSignal(self):
        # Correct (str, unicode, None)
        tiipMessage = TIIPMessage()
        tiipMessage.sig = str(self.signal)
        self.assertEquals(tiipMessage.sig, self.signal)
        tiipMessage.sig = self.signal
        self.assertEquals(tiipMessage.sig, self.signal)
        tiipMessage.sig = None
        self.assertEquals(tiipMessage.sig, None)

        # Incorrect
        with self.assertRaises(TypeError):
            tiipMessage.sig = 1
示例#3
0
    def test021_setChannel(self):
        # Correct (str, unicode, None)
        tiipMessage = TIIPMessage()
        tiipMessage.ch = str(self.channel)
        self.assertEquals(tiipMessage.ch, self.channel)
        tiipMessage.ch = self.channel
        self.assertEquals(tiipMessage.ch, self.channel)
        tiipMessage.ch = None
        self.assertEquals(tiipMessage.ch, None)

        # Incorrect
        with self.assertRaises(TypeError):
            tiipMessage.sig = 1
示例#4
0
    def test021_setChannel(self):
        # Correct (str, unicode, None)
        tiipMessage = TIIPMessage()
        tiipMessage.ch = str(self.channel)
        self.assertEquals(tiipMessage.ch, self.channel)
        tiipMessage.ch = self.channel
        self.assertEquals(tiipMessage.ch, self.channel)
        tiipMessage.ch = None
        self.assertEquals(tiipMessage.ch, None)

        # Incorrect
        with self.assertRaises(TypeError):
            tiipMessage.sig = 1