Skip to content

Commit

Permalink
Fix tests to match the current desired functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
murhum1 committed Feb 19, 2024
1 parent bd5a40e commit 504c722
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion exercise/tests_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,9 @@ def test_accumulation(self):
self.assertEqual(module.submission_count, 2)
self.assertEqual(module.points, 50)
self.assertEqual(module.points_by_difficulty.get('',0), 50)
self.assertFalse(module.passed)
# True for now; passing individual exercises should have no bearing
# on passing a module, to mimic previous functionality
self.assertTrue(module.passed)
category = p.categories()[0]
self.assertTrue(category.passed)

Expand Down
4 changes: 3 additions & 1 deletion threshold/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,9 @@ def test_pass(self):
self.assertFalse(t.is_passed(points))
t.passed_exercises.clear()
t.passed_modules.add(self.module)
self.assertFalse(t.is_passed(points))
# True for now to mimic previous functionality.
# The rest of the test is redundant.
self.assertTrue(t.is_passed(points))
self.submission3.set_points(2,2)
self.submission3.set_ready()
self.submission3.save()
Expand Down

0 comments on commit 504c722

Please sign in to comment.