-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d2e8b10
commit 2f06aee
Showing
1 changed file
with
6 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,7 @@ class GroupTestCase(TestCase): | |
def setUp(self): | ||
# Create teacher user | ||
teacher = User.objects.create( | ||
id=1, | ||
username="teacher_username", | ||
email="[email protected]", | ||
first_name="Kermit", | ||
|
@@ -21,6 +22,7 @@ def setUp(self): | |
|
||
# Create student user | ||
student = User.objects.create( | ||
id=2, | ||
username="student_username", | ||
email="[email protected]", | ||
first_name="Miss", | ||
|
@@ -30,6 +32,7 @@ def setUp(self): | |
|
||
# Create a second student user | ||
student2 = User.objects.create( | ||
id=3, | ||
username="student_username2", | ||
email="[email protected]", | ||
first_name="Fozzie", | ||
|
@@ -67,14 +70,14 @@ def test_group_project_relation(self): | |
|
||
def test_group_student_relation(self): | ||
group = Group.objects.get(group_nr=1) | ||
student = User.objects.get(id=1) | ||
student2 = User.objects.get(id=2) | ||
student = User.objects.get(id=2) | ||
student2 = User.objects.get(id=3) | ||
self.assertIn(student, group.user.all()) | ||
self.assertIn(student2, group.user.all()) | ||
|
||
def test_group_final_score(self): | ||
group = Group.objects.get(group_nr=1) | ||
self.assertEqual(group.final_score, 0) | ||
self.assertEqual(group.final_score, None) | ||
|
||
def test_group_group_nr(self): | ||
group = Group.objects.get(group_nr=1) | ||
|