Exemple #1
0
 def test_tunnelling_request(self):
     """Test string representation of KNX/IP TunnellingRequest."""
     tunnelling_request = TunnellingRequest()
     tunnelling_request.communication_channel_id = 23
     tunnelling_request.sequence_counter = 42
     assert (
         str(tunnelling_request) ==
         '<TunnellingRequest communication_channel_id="23" sequence_counter="42" '
         'cemi="<CEMIFrame SourceAddress="IndividualAddress("0.0.0")" DestinationAddress="GroupAddress("0/0/0")" '
         'Flags="               0" code="L_DATA_REQ" payload="None" />" />')
Exemple #2
0
 def test_tunnelling_request(self):
     """Test string representation of KNX/IP TunnellingRequest."""
     xknx = XKNX(loop=self.loop)
     tunnelling_request = TunnellingRequest(xknx)
     tunnelling_request.communication_channel_id = 23
     tunnelling_request.sequence_counter = 42
     self.assertEqual(
         str(tunnelling_request),
         '<TunnellingRequest communication_channel_id="23" sequence_counter="42" cemi="<CEMIFrame SourceAddress="GroupAddress("0/0/0")" Destina'
         'tionAddress="GroupAddress("0/0/0")" Flags="               0" Command="APCICommand.GROUP_READ" payload="None" />" />')
Exemple #3
0
 def test_tunnelling_request(self):
     """Test string representation of KNX/IP TunnellingRequest."""
     xknx = XKNX(loop=self.loop)
     tunnelling_request = TunnellingRequest(xknx)
     tunnelling_request.communication_channel_id = 23
     tunnelling_request.sequence_counter = 42
     self.assertEqual(
         str(tunnelling_request),
         '<TunnellingRequest communication_channel_id="23" sequence_counter="42" cemi="<CEMIFrame SourceAddress="GroupAddress("0/0/0")" Destina'
         'tionAddress="GroupAddress("0/0/0")" Flags="               0" Command="APCICommand.GROUP_READ" payload="None" />" />')
Exemple #4
0
 def test_tunnelling_request(self):
     """Test string representation of KNX/IP TunnellingRequest."""
     xknx = XKNX()
     tunnelling_request = TunnellingRequest(xknx)
     tunnelling_request.communication_channel_id = 23
     tunnelling_request.sequence_counter = 42
     self.assertEqual(
         str(tunnelling_request),
         '<TunnellingRequest communication_channel_id="23" sequence_counter="42" cemi="<CEMIFrame SourceAddress="IndividualAddress("0.0.0")"'
         ' DestinationAddress="GroupAddress("0/0/0")" Flags="               0" payload="None" />" />',
     )