Select Git revision
      
  test_service_matrix.py
              Ian Galpin authored 
   test_service_matrix.py  607 B 
import json
import jsonschema
import pytest
from compendium_v2.routes.service_matrix import SERVICE_MATRIX_SCHEMA
@pytest.mark.parametrize(
    'endpoint',
    ['service-matrix'])
def test_bad_accept(endpoint, client):
    rv = client.get(
        endpoint,
        headers={'Accept': ['text/html']})
    assert rv.status_code == 406
def test_service_matrix(client):
    rv = client.get(
        'service-matrix',
        headers={'Accept': ['application/json']})
    assert rv.status_code == 200
    result = json.loads(rv.data.decode('utf-8'))
    jsonschema.validate(result, SERVICE_MATRIX_SCHEMA)