mirror of https://github.com/snachodog/mybuddy.git
Fix tests
This commit is contained in:
parent
5b13a38f98
commit
f8212bfe80
17
api/tests.py
17
api/tests.py
|
@ -887,17 +887,22 @@ class TestProfileAPITestCase(APITestCase):
|
||||||
self.assertEqual(response.status_code, status.HTTP_200_OK)
|
self.assertEqual(response.status_code, status.HTTP_200_OK)
|
||||||
self.assertDictContainsSubset(
|
self.assertDictContainsSubset(
|
||||||
{
|
{
|
||||||
"user": 1,
|
|
||||||
"username": "admin",
|
|
||||||
"first_name": "",
|
|
||||||
"last_name": "",
|
|
||||||
"email": "",
|
|
||||||
"staff": True,
|
|
||||||
"language": "en-US",
|
"language": "en-US",
|
||||||
"timezone": "UTC",
|
"timezone": "UTC",
|
||||||
},
|
},
|
||||||
response.data,
|
response.data,
|
||||||
)
|
)
|
||||||
|
self.assertDictContainsSubset(
|
||||||
|
{
|
||||||
|
"id": 1,
|
||||||
|
"username": "admin",
|
||||||
|
"first_name": "",
|
||||||
|
"last_name": "",
|
||||||
|
"email": "",
|
||||||
|
"is_staff": True,
|
||||||
|
},
|
||||||
|
response.data["user"],
|
||||||
|
)
|
||||||
|
|
||||||
# Test that api_key is in the mix and "some long string"
|
# Test that api_key is in the mix and "some long string"
|
||||||
self.assertIn("api_key", response.data)
|
self.assertIn("api_key", response.data)
|
||||||
|
|
Loading…
Reference in New Issue