Skip to content
This repository has been archived by the owner on Jan 5, 2024. It is now read-only.

Commit

Permalink
test(forms): ✅ Update tests to match last changes in b07a550
Browse files Browse the repository at this point in the history
Signed-off-by: Matthew Gray <[email protected]>
  • Loading branch information
mmoomocow committed Sep 13, 2023
1 parent 7a71908 commit 11e0dc4
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions commendations/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,11 +208,12 @@ def test_CommendationAdmin(self):
commendation.students.add(self.student.student)
commendation.save()

admin = CommendationAdmin(commendation, None)
admin = CommendationAdmin(Commendation, None)
studentList = admin.listStudents(commendation)
self.assertEqual(
admin.students(commendation),
self.student.student.__str__(),
f"Commendation students was not set correctly, expected {self.student.student}, got {admin.students(commendation)}",
studentList,
self.student.student.user.first_name,
f"CommendationAdmin listStudents was not set correctly, expected {self.student.student.user.first_name}, got {studentList}",
)


Expand All @@ -231,7 +232,7 @@ def test_giveCommendation_post_reason(self):
"/commendations/award/",
{
"commendationType": Commendation.EXCELLENCE,
"students": [self.student.student.id],
"selectedStudents": str(self.student.student.id),
"teacher": self.teacher.teacher.id,
"reason": "Test commendation",
"quickReason": "",
Expand All @@ -257,7 +258,7 @@ def test_giveCommendation_post_no_reason(self):
"/commendations/award/",
{
"commendationType": Commendation.EXCELLENCE,
"students": [self.student.student.id],
"selectedStudents": str(self.student.student.id),
"teacher": self.teacher.teacher.id,
"reason": "",
"quickReason": "",
Expand All @@ -283,7 +284,7 @@ def test_giveCommendation_post_reason_AND_quickReason(self):
"/commendations/award/",
{
"commendationType": Commendation.EXCELLENCE,
"students": [self.student.student.id],
"selectedStudents": str(self.student.student.id),
"teacher": self.teacher.teacher.id,
"reason": "And very helpful",
"quickReason": "Being truthful",
Expand All @@ -309,7 +310,7 @@ def test_giveCommendation_post_only_quickReason(self):
"/commendations/award/",
{
"commendationType": Commendation.EXCELLENCE,
"students": [self.student.student.id],
"selectedStudents": str(self.student.student.id),
"teacher": self.teacher.teacher.id,
"reason": "",
"quickReason": "Being truthful",
Expand Down

0 comments on commit 11e0dc4

Please sign in to comment.