Skip to content

Commit

Permalink
added assertions for response content
Browse files Browse the repository at this point in the history
  • Loading branch information
Diane Kaplan committed Nov 2, 2020
1 parent 977c8a3 commit 6273c0b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lms/djangoapps/experiments/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,10 @@ def test_UserMetaDataView_get_success_staff_user(self):

response = self.client.get(reverse('api_experiments:user_metadata', args=call_args))
self.assertEqual(response.status_code, 200)
self.assertTrue(response.json()['course_id'])
self.assertTrue(response.json()['user_id'])
self.assertEqual(response.json()['username'], lookup_user.username)
self.assertEqual(response.json()['email'], lookup_user.email)

def test_UserMetaDataView_get_different_user(self):
""" Request fails when not logged in for requested user or staff """
Expand Down

0 comments on commit 6273c0b

Please sign in to comment.