commit
9a6ebdb2cf
@ -13,7 +13,7 @@ class TestWhoAmIView(TestCase):
|
|||||||
|
|
||||||
self.assertEqual(response.status_code, 200)
|
self.assertEqual(response.status_code, 200)
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
json.loads(response.content.decode('utf-8')),
|
json.loads(response.content.decode()),
|
||||||
{'user_id': None, 'guest_enabled': False})
|
{'user_id': None, 'guest_enabled': False})
|
||||||
|
|
||||||
def test_get_authenticated_user(self):
|
def test_get_authenticated_user(self):
|
||||||
@ -23,7 +23,7 @@ class TestWhoAmIView(TestCase):
|
|||||||
|
|
||||||
self.assertEqual(response.status_code, 200)
|
self.assertEqual(response.status_code, 200)
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
json.loads(response.content.decode('utf-8')),
|
json.loads(response.content.decode()),
|
||||||
{'user_id': 1, 'guest_enabled': False})
|
{'user_id': 1, 'guest_enabled': False})
|
||||||
|
|
||||||
def test_post(self):
|
def test_post(self):
|
||||||
@ -78,7 +78,7 @@ class TestUserLoginView(TestCase):
|
|||||||
|
|
||||||
self.assertEqual(response.status_code, 200)
|
self.assertEqual(response.status_code, 200)
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
json.loads(response.content.decode('utf-8')),
|
json.loads(response.content.decode()),
|
||||||
{'user_id': 1})
|
{'user_id': 1})
|
||||||
|
|
||||||
def test_post_incorrect_data(self):
|
def test_post_incorrect_data(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user