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)