-
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
cba6b28
commit 88a52a1
Showing
12 changed files
with
20 additions
and
25 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
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
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
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
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
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
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
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 |
---|---|---|
|
@@ -15,7 +15,7 @@ def setUp(self): | |
last_name="The Frog", | ||
role=2 | ||
) | ||
|
||
# Create student user | ||
User.objects.create( | ||
id=2, | ||
|
@@ -33,15 +33,15 @@ def test_student_fields(self): | |
self.assertEqual(student[0].first_name, "Kermit") | ||
self.assertEqual(student[0].last_name, "The Frog") | ||
self.assertEqual(student[0].role, 2) | ||
|
||
def test_teacher_fields(self): | ||
teacher = User.objects.get(id=2), | ||
self.assertEqual(teacher[0].username, "student_username") | ||
self.assertEqual(teacher[0].email, "[email protected]"), | ||
self.assertEqual(teacher[0].first_name, "Miss") | ||
self.assertEqual(teacher[0].last_name, "Piggy") | ||
self.assertEqual(teacher[0].role, 3) | ||
|
||
def test_user_name_length_validation(self): | ||
with self.assertRaises(Exception): | ||
User.objects.create( | ||
|
@@ -51,7 +51,7 @@ def test_user_name_length_validation(self): | |
last_name="Piggy", | ||
role=3 | ||
) | ||
|
||
# TODO | ||
def test_user_correct_email(self): | ||
with self.assertRaises(Exception): | ||
|
@@ -62,7 +62,7 @@ def test_user_correct_email(self): | |
last_name="Piggy", | ||
role=3 | ||
) | ||
|
||
def test_user_role_validation(self): | ||
with self.assertRaises(Exception): | ||
User.objects.create( | ||
|
@@ -72,7 +72,3 @@ def test_user_role_validation(self): | |
last_name="Piggy", | ||
role=4 | ||
) | ||
|
||
|
||
|
||
|
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
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
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
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