示例#1
0
文件: tests.py 项目: ArmandNM/wouso
 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)
示例#2
0
文件: tests.py 项目: ArmandNM/wouso
 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)
示例#3
0
文件: tests.py 项目: ArmandNM/wouso
 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)
示例#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)
示例#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)
示例#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)