summaryrefslogtreecommitdiff
diff options
-rw-r--r--unit_tests/test_hooks.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/unit_tests/test_hooks.py b/unit_tests/test_hooks.py
index 55d94f0..9b7f7b8 100644
--- a/unit_tests/test_hooks.py
+++ b/unit_tests/test_hooks.py
@@ -70,7 +70,7 @@ class MongoHooksTest(CharmTestCase):
self.relation_set.assert_called_with('fake-relation-id', exp_rel_vals)
@patch.object(hooks, 'run_admin_command')
- @patch.object(hooks, 'MongoClient')
+ @patch.object(hooks, 'Connection')
@patch.object(hooks, 'config')
@patch.object(hooks, 'mongo_client')
@patch('time.sleep')
@@ -159,7 +159,7 @@ class MongoHooksTest(CharmTestCase):
fatal=True)
@patch.object(hooks, 'run_admin_command')
- @patch.object(hooks, 'MongoClient')
+ @patch.object(hooks, 'Connection')
@patch('time.sleep')
def test_am_i_primary(self, mock_sleep, mock_mongo_client,
mock_run_admin_cmd):
@@ -172,7 +172,7 @@ class MongoHooksTest(CharmTestCase):
self.assertEqual(exp, rv)
@patch.object(hooks, 'run_admin_command')
- @patch.object(hooks, 'MongoClient')
+ @patch.object(hooks, 'Connection')
@patch('time.sleep')
def test_am_i_primary_too_many_attempts(self, mock_sleep,
mock_mongo_client,
@@ -189,7 +189,7 @@ class MongoHooksTest(CharmTestCase):
pass
@patch.object(hooks, 'run_admin_command')
- @patch.object(hooks, 'MongoClient')
+ @patch.object(hooks, 'Connection')
@patch('time.sleep')
def test_am_i_primary_operation_failures(self, mock_sleep,
mock_mongo_client,