diff --git a/spond_classes/classes.py b/spond_classes/classes.py index 4f0f170..c74f508 100644 --- a/spond_classes/classes.py +++ b/spond_classes/classes.py @@ -143,12 +143,8 @@ class SpondSubgroup: uid: str # from API 'id' name: str # from API 'name' - parent_group: None | SpondGroup = field(init=False) # derived members: list[SpondMember] = field(default_factory=list) # derived - def __post_init__(self) -> None: - self.parent_group = None - def __str__(self) -> str: return f"[SpondSubgroup '{self.name}']" diff --git a/tests/test_spondsubgroup.py b/tests/test_spondsubgroup.py index 5de6ea0..e390311 100644 --- a/tests/test_spondsubgroup.py +++ b/tests/test_spondsubgroup.py @@ -18,14 +18,12 @@ def test_create(): valid_attributes = [ "uid", "name", - "parent_group", "members", ] assert sets_equal(public_attributes(my_ssg), valid_attributes) assert my_ssg.uid == "001" assert my_ssg.name == "My subgroup" - assert my_ssg.parent_group is None assert my_ssg.members == [] @@ -52,12 +50,10 @@ def test_from_dict(simplest_subgroup_dict): valid_attributes = [ "uid", "name", - "parent_group", "members", ] assert sets_equal(public_attributes(my_ssg), valid_attributes) assert my_ssg.uid == "8CC576609CF3DCBC44469A799E76B22B" assert my_ssg.name == "Subgroup A1" - assert my_ssg.parent_group is None assert my_ssg.members == []