Skip to content

Commit

Permalink
remove: partially implemented SpondSubgroup.parent_group'
Browse files Browse the repository at this point in the history
  • Loading branch information
elliot-100 committed Feb 28, 2023
1 parent bf1a256 commit fb5d592
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
4 changes: 0 additions & 4 deletions spond_classes/classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}']"

Expand Down
4 changes: 0 additions & 4 deletions tests/test_spondsubgroup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 == []


Expand All @@ -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 == []

0 comments on commit fb5d592

Please sign in to comment.