Skip to content

Commit

Permalink
feat: upgrading simple api to drf compatible.
Browse files Browse the repository at this point in the history
  • Loading branch information
awais786 committed Aug 28, 2024
1 parent 6b1d7e3 commit e9ecbdb
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions lms/djangoapps/instructor/tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -3517,13 +3517,13 @@ def test_send_email_but_not_logged_in(self):
response = self.client.post(url, self.full_test_message)
assert response.status_code == 401

# def test_send_email_logged_in_but_no_perms(self):
# self.client.logout()
# user = UserFactory()
# self.client.login(username=user.username, password=self.TEST_PASSWORD)
# url = reverse('send_email', kwargs={'course_id': str(self.course.id)})
# response = self.client.post(url, self.full_test_message)
# assert response.status_code == 403
def test_send_email_logged_in_but_no_perms(self):
self.client.logout()
user = UserFactory()
self.client.login(username=user.username, password=self.TEST_PASSWORD)
url = reverse('send_email', kwargs={'course_id': str(self.course.id)})
response = self.client.post(url, self.full_test_message)
assert response.status_code == 403

def test_send_email_but_not_staff(self):
self.client.logout()
Expand Down

0 comments on commit e9ecbdb

Please sign in to comment.