From b94bf18a93f74f69c6da2efac5f7d5566d51f26d Mon Sep 17 00:00:00 2001 From: abhishekram Date: Tue, 4 Dec 2018 15:29:03 +0530 Subject: [PATCH] do nothing on close connections --- src/protean/impl/repository/dict_repo.py | 5 ++--- tests/core/test_repository.py | 1 - 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/protean/impl/repository/dict_repo.py b/src/protean/impl/repository/dict_repo.py index 060d480f..e3985ffb 100644 --- a/src/protean/impl/repository/dict_repo.py +++ b/src/protean/impl/repository/dict_repo.py @@ -159,6 +159,5 @@ def get_connection(self): return database def close_connection(self, conn): - """ Remove the dictionary database object """ - del _databases[self.conn_name] - del _locks[self.conn_name] + """ Close connection does nothing on the repo """ + pass diff --git a/tests/core/test_repository.py b/tests/core/test_repository.py index dcb16221..e80cd099 100644 --- a/tests/core/test_repository.py +++ b/tests/core/test_repository.py @@ -133,4 +133,3 @@ def test_close_connections(self): """ Test closing all connections to the repository""" assert 'default' in _databases repo.close_connections() - assert _databases == {}