Exemplo n.º 1
0
 def testTcpClientRegister(self):
     class CustomeRequest:
         function_code = 79
     client = ModbusTcpClient()
     client.framer = Mock()
     client.register(CustomeRequest)
     assert client.framer.decoder.register.called_once_with(CustomeRequest)
Exemplo n.º 2
0
    def testTcpClientRegister(self):
        class CustomeRequest:
            function_code = 79

        client = ModbusTcpClient()
        client.framer = Mock()
        client.register(CustomeRequest)
        assert client.framer.decoder.register.called_once_with(CustomeRequest)