Skip to content

Commit

Permalink
fixing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
snyaggarwal committed Nov 17, 2023
1 parent b350e7b commit 50d83ab
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions core/sources/tests/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -759,18 +759,16 @@ def test_resolve_reference_expression_existing(self): # pylint: disable=too-man
self.assertEqual(resolved_version.canonical_url, None)
self.assertFalse(resolved_version.is_fqdn)

@patch('core.mappings.documents.MappingDocument.update')
@patch('core.concepts.documents.ConceptDocument.update')
def test_index_children(self, concept_document_update, mapping_document_update):
@patch('core.sources.models.Source.batch_index')
def test_index_children(self, batch_index_mock):
source = OrganizationSourceFactory()
concept1 = ConceptFactory(parent=source)
concept2 = ConceptFactory(parent=source)
MappingFactory(parent=source, from_concept=concept1, to_concept=concept2)

source.index_children()

concept_document_update.assert_called_once_with(ANY, parallel=True)
mapping_document_update.assert_called_once_with(ANY, parallel=True)
self.assertEqual(batch_index_mock.call_count, 2)

def test_autoid_start_from_validate_non_negative(self):
for field in [
Expand Down

0 comments on commit 50d83ab

Please sign in to comment.