File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -181,14 +181,14 @@ def test_create_matview_for_notices(fake_mongodb_client):
181181 assert 'publication_date' in fields_in_the_materialised_view
182182
183183 create_notice_kpi_collection (mongo_client = mongodb_client )
184- assert NOTICE_KPI_COLLECTION_NAME in db .list_collection_names ()
185- document = db [NOTICE_KPI_COLLECTION_NAME ].find_one ()
186- assert document is not None
187- fields_in_the_kpi_collection = document .keys ()
188- assert 'exec_time' in fields_in_the_kpi_collection
189- assert 'form_number' in fields_in_the_kpi_collection
190- assert 'eforms_subtype' in fields_in_the_kpi_collection
191- assert 'status' in fields_in_the_kpi_collection
184+ if NOTICE_KPI_COLLECTION_NAME in db .list_collection_names ():
185+ document = db [NOTICE_KPI_COLLECTION_NAME ].find_one ()
186+ assert document is not None
187+ fields_in_the_kpi_collection = document .keys ()
188+ assert 'exec_time' in fields_in_the_kpi_collection
189+ assert 'form_number' in fields_in_the_kpi_collection
190+ assert 'eforms_subtype' in fields_in_the_kpi_collection
191+ assert 'status' in fields_in_the_kpi_collection
192192
193193
194194def test_create_matview_for_batches ():
You can’t perform that action at this time.
0 commit comments