Exemplo n.º 1
0
 def test_disconnect_request(self):
     """Test string representation of KNX/IP DisconnectRequest."""
     xknx = XKNX(loop=self.loop)
     disconnect_request = DisconnectRequest(xknx)
     disconnect_request.communication_channel_id = 13
     disconnect_request.control_endpoint = HPAI(ip_addr='192.168.42.1', port=33941)
     self.assertEqual(
         str(disconnect_request),
         '<DisconnectRequest CommunicationChannelID="13" control_endpoint="<HPAI 192.168.42.1:33941 />" />')
Exemplo n.º 2
0
 def test_disconnect_request(self):
     """Test string representation of KNX/IP DisconnectRequest."""
     xknx = XKNX(loop=self.loop)
     disconnect_request = DisconnectRequest(xknx)
     disconnect_request.communication_channel_id = 13
     disconnect_request.control_endpoint = HPAI(ip_addr='192.168.42.1', port=33941)
     self.assertEqual(
         str(disconnect_request),
         '<DisconnectRequest CommunicationChannelID="13" control_endpoint="<HPAI 192.168.42.1:33941 />" />')
Exemplo n.º 3
0
 def test_disconnect_request(self):
     """Test string representation of KNX/IP DisconnectRequest."""
     disconnect_request = DisconnectRequest()
     disconnect_request.communication_channel_id = 13
     disconnect_request.control_endpoint = HPAI(ip_addr="192.168.42.1",
                                                port=33941)
     assert (
         str(disconnect_request) ==
         '<DisconnectRequest communication_channel_id="13" control_endpoint="192.168.42.1:33941/udp" />'
     )