Commit 798dc379 authored by Anastasiia Leshkevych's avatar Anastasiia Leshkevych
Browse files

fix(tests): fix integration tests due to mirror update

parent f630de97
Pipeline #27749 passed with stages
in 2 minutes and 54 seconds
......@@ -77,7 +77,7 @@ class WebSocketActionTest(test_utils.AioHTTPTestCase):
self.assertEqual(client_obj['actingEntity']['contactPoint']['name']['uk_UA'], 'updated_value')
@test_utils.unittest_run_loop
async def test_update_with_none(self):
async def test_update_with_invalid_value(self):
document = deepcopy(ACTION_OBJECT)
document = _migrate(document, 'action')
document = load_action_object(document).to_native()
......@@ -91,7 +91,9 @@ class WebSocketActionTest(test_utils.AioHTTPTestCase):
{'$set': {'actingEntity.contactPoint.name.uk_UA': None}})
await asyncio.sleep(2)
client_obj = await self.db_copy.action.find_one({"_id": result.inserted_id})
self.assertEqual(client_obj['actingEntity']['contactPoint']['name']['uk_UA'], None)
# Should not be updated because the value changes to invalid
self.assertEqual(client_obj['actingEntity']['contactPoint']['name']['uk_UA'], 'magna commodo officia')
@test_utils.unittest_run_loop
async def test_replace(self):
......
......@@ -77,7 +77,7 @@ class WebSocketLeaseTest(test_utils.AioHTTPTestCase):
self.assertEqual(client_obj['sellingEntity']['contactPoint']['name']['uk_UA'], 'updated_value')
@test_utils.unittest_run_loop
async def test_update_with_none(self):
async def test_update_with_invalid_value(self):
document = deepcopy(LEASE_OBJECT)
document = _migrate(document, 'lease_request')
document = load_lease_request_object(document).to_native()
......@@ -91,7 +91,9 @@ class WebSocketLeaseTest(test_utils.AioHTTPTestCase):
{'$set': {'sellingEntity.contactPoint.name.uk_UA': None}})
await asyncio.sleep(2)
client_obj = await self.db_copy.lease_request.find_one({"_id": result.inserted_id})
self.assertEqual(client_obj['sellingEntity']['contactPoint']['name']['uk_UA'], None)
# Should not be updated because the value changes to invalid
self.assertEqual(client_obj['sellingEntity']['contactPoint']['name']['uk_UA'], 'magna commodo officia')
@test_utils.unittest_run_loop
async def test_replace(self):
......
......@@ -77,7 +77,7 @@ class WebSocketRegiatryTest(test_utils.AioHTTPTestCase):
self.assertEqual(client_obj['relatedOrganizations']['propertyOwner']['representativeInfo'], 'updated_value')
@test_utils.unittest_run_loop
async def test_update_with_none(self):
async def test_update_with_invalid_value(self):
document = deepcopy(REGISTRY_OBJECT)
document = _migrate(document, 'registry')
document = load_registry_object(document).to_native()
......@@ -91,7 +91,9 @@ class WebSocketRegiatryTest(test_utils.AioHTTPTestCase):
{'$set': {'relatedOrganizations.propertyOwner.representativeInfo': None}})
await asyncio.sleep(2)
client_obj = await self.db_copy.registry.find_one({"_id": result.inserted_id})
self.assertEqual(client_obj['relatedOrganizations']['propertyOwner']['representativeInfo'], None)
# Should not be updated because the value changes to invalid
self.assertEqual(client_obj['relatedOrganizations']['propertyOwner']['representativeInfo'], 'Довіреність')
@test_utils.unittest_run_loop
async def test_replace(self):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment