def test_connection_multiple_calls(self, mock_open): # multiple requests should return the same connection object, even # across instances connection1 = self.manager.connection() connection2 = TopicPublishManager().connection() self.assertEqual(connection1, connection2)
def setUp(self): self.manager = TopicPublishManager() self.manager._connection = None