summaryrefslogtreecommitdiff
path: root/t/integration/test_integration.py
diff options
context:
space:
mode:
Diffstat (limited to 't/integration/test_integration.py')
-rw-r--r--t/integration/test_integration.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/t/integration/test_integration.py b/t/integration/test_integration.py
index d441488..d0b67b9 100644
--- a/t/integration/test_integration.py
+++ b/t/integration/test_integration.py
@@ -416,6 +416,17 @@ class test_connection:
)
callback_mock.assert_called_once_with()
+ def test_send_heartbeat(self):
+ """The send_heartbeat method writes the expected output."""
+ conn = Connection()
+ with patch.object(conn, 'Transport') as transport_mock:
+ handshake(conn, transport_mock)
+ transport_mock().write.reset_mock()
+ conn.send_heartbeat()
+ transport_mock().write.assert_called_once_with(
+ memoryview(bytearray(b'\x08\x00\x00\x00\x00\x00\x00\xce'))
+ )
+
class test_channel:
# Integration tests. Tests verify the correctness of communication between