Skip to content

Commit

Permalink
remove source in test_base
Browse files Browse the repository at this point in the history
  • Loading branch information
shenchenruwo committed Nov 8, 2024
1 parent e421655 commit f6e4555
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions sdk/test/model/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ def generate_example_referable_tree() -> model.Referable:
Generates an example referable tree, built like this:
example_grandparent -> example_parent -> example_referable -> example_child -> example_grandchild
example_grandparent and example_grandchild both have an nonempty source, pointing to the mock-backend
:return: example_referable
"""
Expand All @@ -93,9 +92,6 @@ def generate_example_referable_with_namespace(id_short: model.NameType,
example_parent = generate_example_referable_with_namespace("exampleParent", example_referable)
example_grandparent = generate_example_referable_with_namespace("exampleGrandparent", example_parent)

example_grandchild.source = "mockScheme:exampleGrandchild"
example_grandparent.source = "mockScheme:exampleGrandparent"

return example_referable


Expand Down Expand Up @@ -160,17 +156,6 @@ def test_update_from(self):
self.assertIs(example_submodel.namespace_element_sets[0], example_submodel.submodel_element)
self.assertIs(example_relel.parent, example_submodel)

# Test source update
example_relel.source = "scheme:OldRelElSource"
other_submodel.source = "scheme:NewSource"
other_relel.source = "scheme:NewRelElSource"

example_submodel.update_from(other_submodel)
# Sources of the object itself should not be updated by default
self.assertEqual("", example_submodel.source)
# Sources of embedded objects should always be updated
self.assertEqual("scheme:NewRelElSource", example_relel.source)

def test_update_commit_qualifier_extension_semantic_id(self):
submodel = model.Submodel("https://acplt.org/Test_Submodel")
submodel.update()
Expand Down

0 comments on commit f6e4555

Please sign in to comment.