Skip to content
Snippets Groups Projects
Select Git revision
  • 6cfc24d61164f1269019c71bad79fcdca8754239
  • develop default
  • master protected
  • feature/frontend-tests
  • 0.106
  • 0.105
  • 0.104
  • 0.103
  • 0.102
  • 0.101
  • 0.100
  • 0.99
  • 0.98
  • 0.97
  • 0.96
  • 0.95
  • 0.94
  • 0.93
  • 0.92
  • 0.91
  • 0.90
  • 0.89
  • 0.88
  • 0.87
24 results

test_service_matrix.py

Blame
  • 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)