Skip to content
This repository has been archived by the owner on Jul 9, 2019. It is now read-only.

docker build is failure in lint step #31

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions tests/services/TestMongoService.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down Expand Up @@ -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))
Expand All @@ -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 = (
Expand Down