Permalink
Browse files

Making test more accurate for exercises

  • Loading branch information...
christophercoy committed Apr 21, 2012
1 parent c6ecb58 commit 1dfd4b628a7e2b28b1942fc229b53c9455133a3f
Showing with 10 additions and 1 deletion.
  1. +10 −1 codenamek/schools/tests.py
View
@@ -38,12 +38,21 @@ def test_add_users_to_team(self):
def test_add_exercises_to_team(self):
team = create_team_for_tests()
exercise = create_exercise_for_team(team, 'Understanding Decimal Place Values')
+
+ # see if we can get the group back
+ groups = exercise.exercise_groups
+ self.assertGreater(groups.count(),0,"")
+ self.assertGreater(team.group_exercises.count(),0,"")
pass
def test_add_exercises_to_classroom(self):
school = add_school(school_name="Test School")
school_class = add_class(school_id=school.id, _class_name="Math 101")
exercise = create_exercise_for_classroom(school_class, 'Understanding Decimal Place Values')
+
+ # see if we can get the group back
+ groups = exercise.exercise_groups
+ self.assertGreater(groups.count(),0,"")
pass
def test_add_exercises_to_user(self):
@@ -53,7 +62,7 @@ def test_add_exercises_to_user(self):
def test_add_team_to_class(self):
team = create_team_for_tests()
- self.assertIsNotNone(team, "Team is nothing, was there a problem creating it?")
+ self.assertIsNotNone(team, "Team is nothing, was there a problem creating it?")
pass
def test_get_main_school_for_user(self):

0 comments on commit 1dfd4b6

Please sign in to comment.