| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -326,3 +326,4 @@ def test_students(self): | |||
| 326 | 326 | student = st[0] | |
| 327 | 327 | assert type(student) == webuntis.objects.StudentObject | |
| 328 | 328 | assert student.full_name == "Alexander Mueller" | |
| 329 | + assert student.gender == "male" | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -718,6 +718,9 @@ def full_name(self): | |||
| 718 | 718 | """full name of student (forname, longname)""" | |
| 719 | 719 | return " ".join((self.fore_name, self.long_name)).strip() | |
| 720 | 720 | ||
| 721 | + @lazyproperty | ||
| 722 | + def gender(self): | ||
| 723 | + return self._data[u'gender'] | ||
| 721 | 724 | ||
| 722 | 725 | class StudentsList(ListResult): | |
| 723 | 726 | _itemclass = StudentObject | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -308,6 +308,9 @@ class StudentObject(PersonObject): | |||
| 308 | 308 | def full_name(self) -> str: | |
| 309 | 309 | ... | |
| 310 | 310 | ||
| 311 | + @property | ||
| 312 | + def gender(self) -> str: | ||
| 313 | + ... | ||
| 311 | 314 | ||
| 312 | 315 | class StudentsList(ListResult): | |
| 313 | 316 | _itemclass = StudentObject | |
| Back | FazBrowse Home | New Git URL |
0 commit comments