Beispiel #1
0
 def test_connect_request(self):
     """Test string representation of KNX/IP ConnectRequest."""
     xknx = XKNX(loop=self.loop)
     connect_request = ConnectRequest(xknx)
     connect_request.request_type = ConnectRequestType.TUNNEL_CONNECTION
     connect_request.control_endpoint = HPAI(ip_addr='192.168.42.1', port=33941)
     connect_request.data_endpoint = HPAI(ip_addr='192.168.42.2', port=33942)
     self.assertEqual(
         str(connect_request),
         '<ConnectRequest control_endpoint="<HPAI 192.168.42.1:33941 />" data_endpoint="<HPAI 192.168.42.2:33942 />" request_type="ConnectRequest'
         'Type.TUNNEL_CONNECTION" />')
Beispiel #2
0
 def test_connect_request(self):
     """Test string representation of KNX/IP ConnectRequest."""
     xknx = XKNX(loop=self.loop)
     connect_request = ConnectRequest(xknx)
     connect_request.request_type = ConnectRequestType.TUNNEL_CONNECTION
     connect_request.control_endpoint = HPAI(ip_addr='192.168.42.1', port=33941)
     connect_request.data_endpoint = HPAI(ip_addr='192.168.42.2', port=33942)
     self.assertEqual(
         str(connect_request),
         '<ConnectRequest control_endpoint="<HPAI 192.168.42.1:33941 />" data_endpoint="<HPAI 192.168.42.2:33942 />" request_type="ConnectRequest'
         'Type.TUNNEL_CONNECTION" />')
Beispiel #3
0
 def test_connect_request(self):
     """Test string representation of KNX/IP ConnectRequest."""
     xknx = XKNX()
     connect_request = ConnectRequest(xknx)
     connect_request.request_type = ConnectRequestType.TUNNEL_CONNECTION
     connect_request.control_endpoint = HPAI(ip_addr="192.168.42.1", port=33941)
     connect_request.data_endpoint = HPAI(ip_addr="192.168.42.2", port=33942)
     assert (
         str(connect_request)
         == '<ConnectRequest control_endpoint="<HPAI 192.168.42.1:33941 />" data_endpoint="<HPAI 192.168.42.2:33942 />" '
         'request_type="ConnectRequestType.TUNNEL_CONNECTION" />'
     )