Example #1
0
 def test_all_answers(self):
     q = self.get_question(4, 3)
     post = self.fake_answers(q, 4, 3)
     self.assertEqual(Challenge._calculate_points(post)['points'], 0)
Example #2
0
 def test_no_correct_and_partial_wrong(self):
     q = self.get_question(4, 3)
     post = self.fake_answers(q, 0, 2)
     self.assertEqual(Challenge._calculate_points(post)['points'], 0)
Example #3
0
 def test_full_correct_no_wrong(self):
     q = self.get_question(4, 3)
     post = self.fake_answers(q, 4, 0)
     self.assertEqual(Challenge._calculate_points(post)['points'], 100)
Example #4
0
 def test_all_answers(self):
     q = self.get_question(4, 3)
     post = self.fake_answers(q, 4, 3)
     self.assertEqual(Challenge._calculate_points(post)['points'], 0)
Example #5
0
 def test_no_correct_and_partial_wrong(self):
     q = self.get_question(4, 3)
     post = self.fake_answers(q, 0, 2)
     self.assertEqual(Challenge._calculate_points(post)['points'], 0)
Example #6
0
 def test_full_correct_no_wrong(self):
     q = self.get_question(4, 3)
     post = self.fake_answers(q, 4, 0)
     self.assertEqual(Challenge._calculate_points(post)['points'], 100)