def test_exit(self, _close): connection = BaseConnection(TEST_URL) connection.__exit__() _close.assert_called_with()