Skip to content

Commit 998b6ff

Browse files
vaibhavatlanAryamanz29
authored andcommitted
Added another test case
1 parent a360f2a commit 998b6ff

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

pyatlan/model/assets/core/referenceable.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,10 @@ def validate_required(self):
362362
default=None,
363363
description="Map of remove relationship attributes.",
364364
)
365+
classifications: Optional[List[AtlanTag]] = Field(
366+
default=None,
367+
description="Map of replace classifcations of atlan tag.",
368+
)
365369
add_or_update_classifications: Optional[List[AtlanTag]] = Field(
366370
default=None,
367371
description="Map of add/update classifcations of atlan tag.",

tests/integration/test_client.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -787,6 +787,29 @@ def test_include_atlan_tag_names(client: AtlanClient, term1: AtlasGlossaryTerm):
787787

788788

789789
@pytest.mark.order(after="test_add_classification")
790+
def test_update_classification(client: AtlanClient, term1: AtlasGlossaryTerm):
791+
assert term1.qualified_name
792+
client.asset.update_atlan_tags(
793+
AtlasGlossaryTerm,
794+
term1.qualified_name,
795+
[CLASSIFICATION_NAME],
796+
propagate=True,
797+
remove_propagation_on_delete=False,
798+
)
799+
glossary_term = client.asset.get_by_guid(
800+
term1.guid, asset_type=AtlasGlossaryTerm, ignore_relationships=False
801+
)
802+
assert glossary_term.atlan_tags
803+
assert len(glossary_term.atlan_tags) == 1
804+
classification = glossary_term.atlan_tags[0]
805+
assert str(classification.type_name) == CLASSIFICATION_NAME
806+
assert classification.propagate
807+
assert not classification.remove_propagations_on_entity_delete
808+
assert classification.restrict_propagation_through_lineage
809+
assert not classification.restrict_propagation_through_hierarchy
810+
811+
812+
@pytest.mark.order(after="test_update_classification")
790813
def test_remove_classification(client: AtlanClient, term1: AtlasGlossaryTerm):
791814
assert term1.qualified_name
792815
client.asset.remove_atlan_tags(

0 commit comments

Comments
 (0)