Ejemplo n.º 1
0
class MHSendTests(TestCase):
    def setUp(self):
        #        self.tcp = TCP('127.0.0.1', 8044)
        self.tcp = Mock()
        self.mh = MHSend(self.tcp)
        self.assertIsNotNone(self.mh)

    def test_send_voice_command(self):
        self.mh.voice('turn family lamp on')
        self.tcp.write.assert_called_with('run\x0Dturn family lamp on\x0D')
Ejemplo n.º 2
0
class MHSendTests(TestCase):
    
    def setUp(self):
#        self.tcp = TCP('127.0.0.1', 8044)
        self.tcp = Mock()
        self.mh = MHSend(self.tcp)
        self.assertIsNotNone(self.mh)

    def test_send_voice_command(self):
        self.mh.voice('turn family lamp on')
        self.tcp.write.assert_called_with('run\x0Dturn family lamp on\x0D')
Ejemplo n.º 3
0
 def setUp(self):
     #        self.tcp = TCP('127.0.0.1', 8044)
     self.tcp = Mock()
     self.mh = MHSend(self.tcp)
     self.assertIsNotNone(self.mh)
Ejemplo n.º 4
0
    def setUp(self):
#        self.tcp = TCP('127.0.0.1', 8044)
        self.tcp = Mock()
        self.mh = MHSend(self.tcp)
        self.assertIsNotNone(self.mh)