Skip to content
Snippets Groups Projects
test_instittutions_urls.py 462 B
import json
import jsonschema

from compendium_v2.routes.institutions_urls import INSTITUTION_URLS_RESPONSE_SCHEMA


def test_institutions_urls_response(client, test_institution_urls_data):
    rv = client.get(
        '/api/institutions-urls/',
        headers={'Accept': ['application/json']})
    assert rv.status_code == 200
    result = json.loads(rv.data.decode('utf-8'))
    jsonschema.validate(result, INSTITUTION_URLS_RESPONSE_SCHEMA)
    assert result