Skip to content

Commit 272d426

Browse files
committed
Fixing tests
1 parent 469f1fd commit 272d426

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

core/sources/tests/tests.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1434,14 +1434,18 @@ def test_update_source_active_concepts_count(self):
14341434
def test_index_source_mappings(self, batch_index_mock, source_mappings_mock):
14351435
source = OrganizationSourceFactory()
14361436
index_source_mappings(source.id)
1437-
batch_index_mock.assert_called_once_with(source_mappings_mock, MappingDocument)
1437+
batch_index_mock.assert_called_once_with(
1438+
source_mappings_mock, MappingDocument,
1439+
prefetch=['sources', 'expansion_set', 'expansion_set__collection_version'])
14381440

14391441
@patch('core.sources.models.Source.concepts')
14401442
@patch('core.sources.models.Source.batch_index')
14411443
def test_index_source_concepts(self, batch_index_mock, source_concepts_mock):
14421444
source = OrganizationSourceFactory()
14431445
index_source_concepts(source.id)
1444-
batch_index_mock.assert_called_once_with(source_concepts_mock, ConceptDocument)
1446+
batch_index_mock.assert_called_once_with(
1447+
source_concepts_mock, ConceptDocument,
1448+
prefetch=['sources', 'names', 'descriptions', 'expansion_set', 'expansion_set__collection_version'])
14451449

14461450
@patch('core.sources.models.Source.validate_child_concepts')
14471451
def test_update_validation_schema_success(self, validate_child_concepts_mock):

0 commit comments

Comments
 (0)