Skip to content

Commit

Permalink
OpenConceptLab/ocl_issues#1735 | version exports | fixing test
Browse files Browse the repository at this point in the history
  • Loading branch information
snyaggarwal committed Jan 16, 2024
1 parent d81a9a4 commit a994845
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion core/integration_tests/tests_collections.py
Original file line number Diff line number Diff line change
Expand Up @@ -1782,9 +1782,20 @@ def test_export_collection(self, export_service_mock): # pylint: disable=too-ma

self.assertEqual(
exported_data,
{**CollectionVersionExportSerializer(collection).data, 'concepts': ANY, 'mappings': ANY, 'references': ANY}
{
**CollectionVersionExportSerializer(collection).data,
'concepts': ANY,
'mappings': ANY,
'references': ANY,
'export_time': ANY
}
)

time_taken = exported_data['export_time']
self.assertTrue('secs' in time_taken)
time_taken = float(time_taken.replace('secs', ''))
self.assertTrue(time_taken > 2)

exported_concepts = exported_data['concepts']
expected_concepts = ConceptVersionExportSerializer(
[concept2.get_latest_version(), concept1.get_latest_version()], many=True
Expand Down

0 comments on commit a994845

Please sign in to comment.