tests: don't use resp.json() as it was not available in django 1.8
This commit is contained in:
parent
fcd1a6115b
commit
0257b17ac9
|
@ -191,18 +191,18 @@ def test_notification_ws(john_doe):
|
|||
|
||||
resp = client.get(reverse('api-notification-count'))
|
||||
assert resp.status_code == 200
|
||||
assert resp.json()['new'] == 3
|
||||
assert resp.json()['total'] == 3
|
||||
assert json.loads(resp.content)['new'] == 3
|
||||
assert json.loads(resp.content)['total'] == 3
|
||||
resp = client.get(reverse('api-notification-ack', kwargs={'notification_id': '1'}))
|
||||
resp = client.get(reverse('api-notification-count'))
|
||||
assert resp.status_code == 200
|
||||
assert resp.json()['new'] == 2
|
||||
assert resp.json()['total'] == 3
|
||||
assert json.loads(resp.content)['new'] == 2
|
||||
assert json.loads(resp.content)['total'] == 3
|
||||
resp = client.get(reverse('api-notification-forget', kwargs={'notification_id': '1'}))
|
||||
resp = client.get(reverse('api-notification-count'))
|
||||
assert resp.status_code == 200
|
||||
assert resp.json()['new'] == 2
|
||||
assert resp.json()['total'] == 2
|
||||
assert json.loads(resp.content)['new'] == 2
|
||||
assert json.loads(resp.content)['total'] == 2
|
||||
|
||||
def test_notification_ws_badrequest(john_doe):
|
||||
|
||||
|
|
Loading…
Reference in New Issue