diff --git a/tests/services/TestMongoService.py b/tests/services/TestMongoService.py index 3e08f11..1a62c7d 100644 --- a/tests/services/TestMongoService.py +++ b/tests/services/TestMongoService.py @@ -116,7 +116,7 @@ def test__mongoAdminCommand_TimeoutError(self, mongo_client_mock): def test__mongoAdminCommand_NoPrimary(self, mongo_client_mock): mongo_client_mock.return_value.admin.command.side_effect = ( - ConnectionFailure("No replica set members match selector \"Primary()\""), + ConnectionFailure('No replica set members match selector "Primary()"'), self._getFixture("initiate-ok"), self._getFixture("initiate-ok") @@ -187,7 +187,7 @@ def test_checkOrCreateReplicaSet_ValueError(self, mongo_client_mock): def test_checkOrCreateReplicaSet_OperationalFailure(self, mongo_client_mock): bad_value = "BadValue: Unexpected field foo in replica set member configuration for member:" \ - "{ _id: 0, foo: \"localhost:27017\" }" + '{ _id: 0, foo: "localhost:27017" }' mongo_client_mock.return_value.admin.command.side_effect = ( OperationFailure(bad_value), OperationFailure(bad_value)) @@ -203,12 +203,12 @@ def test_createUsers_ok(self, mongo_client_mock): def test_createUsers_ValueError(self, mongo_client_mock): mongo_client_mock.return_value.admin.command.side_effect = (None, OperationFailure( - "\"createUser\" had the wrong type. Expected string, found object")) + '"createUser" had the wrong type. Expected string, found object')) with self.assertRaises(OperationFailure) as context: self.service.createUsers(self.cluster_object) - self.assertEqual("\"createUser\" had the wrong type. Expected string, found object", str(context.exception)) + self.assertEqual('"createUser" had the wrong type. Expected string, found object', str(context.exception)) def test_createUsers_TimeoutError(self, mongo_client_mock): mongo_client_mock.return_value.admin.command.side_effect = (