From de39689cab64d0c9505636479632e9ae739f8e30 Mon Sep 17 00:00:00 2001
From: "Gavin M. Roy" <gavinr@aweber.com>
Date: Wed, 4 Nov 2015 17:00:40 -0500
Subject: Make the test more reliable in Python 3.5

---
 tests/unit/heartbeat_tests.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/tests/unit/heartbeat_tests.py b/tests/unit/heartbeat_tests.py
index 9ec496f..62aa777 100644
--- a/tests/unit/heartbeat_tests.py
+++ b/tests/unit/heartbeat_tests.py
@@ -152,8 +152,11 @@ class HeartbeatTests(unittest.TestCase):
         self.assertIsInstance(self.obj._new_heartbeat_frame(), frame.Heartbeat)
 
     def test_send_heartbeat_send_frame_called(self):
-        self.obj._send_heartbeat_frame()
-        self.mock_conn._send_frame.assert_called_once()
+        frame_value = self.obj._new_heartbeat_frame()
+        with mock.patch.object(self.obj, '_new_heartbeat_frame') as new_frame:
+            new_frame.return_value = frame_value
+            self.obj._send_heartbeat_frame()
+            self.mock_conn._send_frame.assert_called_once_with(frame_value)
 
     def test_send_heartbeat_counter_incremented(self):
         self.obj._send_heartbeat_frame()
