diff options
| author | Mario Splivalo <mario.splivalo@canonical.com> | 2015-01-21 22:50:41 +0100 | 
|---|---|---|
| committer | Mario Splivalo <mario.splivalo@canonical.com> | 2015-01-21 22:50:41 +0100 | 
| commit | fe1041904f28018d93eba76714e32d6f6fed5bc7 (patch) | |
| tree | 9612bc9d22754232bb42ed73344d71e89c92c856 /unit_tests | |
| parent | 4032a0750938bab7eb1004bcef1262677f5160c4 (diff) | |
Fix unit_tests (MongoClient->Connection)
Diffstat (limited to 'unit_tests')
| -rw-r--r-- | unit_tests/test_hooks.py | 8 | 
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, | 
