Skip to content

Commit

Permalink
fix: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
qasimgulzar committed Sep 27, 2024
1 parent cac2601 commit 37a8a5a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lms/djangoapps/courseware/testutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ def test_success_enrolled_student(self):
def test_unauthenticated(self):
self.setup_course()
self.setup_user(admin=False, enroll=True, login=False)
self.verify_response(expected_response_code=404)
self.verify_response(expected_response_code=403)

def test_unenrolled_student(self):
self.setup_course()
Expand All @@ -236,14 +236,14 @@ def test_fail_block_unreleased(self):
self.setup_user(admin=False, enroll=True, login=True)
self.block_to_be_tested.start = datetime.max
modulestore().update_item(self.block_to_be_tested, self.user.id)
self.verify_response(expected_response_code=404)
self.verify_response(expected_response_code=403)

def test_fail_block_nonvisible(self):
self.setup_course()
self.setup_user(admin=False, enroll=True, login=True)
self.block_to_be_tested.visible_to_staff_only = True
modulestore().update_item(self.block_to_be_tested, self.user.id)
self.verify_response(expected_response_code=404)
self.verify_response(expected_response_code=403)

@ddt.data(
'vertical_block',
Expand Down

0 comments on commit 37a8a5a

Please sign in to comment.