cartads cs/tests: parse response json instead of checking string value
This commit is contained in:
parent
5070746b0d
commit
2d0cc69af0
|
@ -646,7 +646,8 @@ def test_role_sync(connector, app, cached_data):
|
|||
assert url.netloc == 'idp.example.org'
|
||||
if url.path == '/api/roles/':
|
||||
dossier = CartaDSDossier.objects.all().first()
|
||||
assert request.body == '{"name": "Suivi Cart@DS (%s)", "slug": "_cartads_%s"}' % (dossier.id, dossier.id)
|
||||
assert json.loads(request.body) == json.loads(
|
||||
'{"name": "Suivi Cart@DS (%s)", "slug": "_cartads_%s"}' % (dossier.id, dossier.id))
|
||||
return {'content': json.dumps({'uuid': 'role-uuid'}), 'status_code': 200}
|
||||
elif url.path == '/api/roles/role-uuid/relationships/members/':
|
||||
body = json.loads(request.body)
|
||||
|
|
Loading…
Reference in New Issue