コード例 #1
0
ファイル: test_client_sync.py プロジェクト: bashwork/pymodbus
 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)
コード例 #2
0
ファイル: test_client_sync.py プロジェクト: yzhz0322/pymodbus
    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)