Skip to content

Commit

Permalink
Coverage | Source index children test
Browse files Browse the repository at this point in the history
  • Loading branch information
snyaggarwal committed Mar 24, 2022
1 parent 02e3fba commit ab72a3a
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions core/sources/tests/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -745,6 +745,19 @@ 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):
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)


class TasksTest(OCLTestCase):
@patch('core.sources.models.Source.index_children')
Expand Down

0 comments on commit ab72a3a

Please sign in to comment.