Skip to content
Snippets Groups Projects
Select Git revision
  • e6b358ddf6682f9c1d37ecf3a07c1bdfc933bbe3
  • develop default protected
  • master protected
  • 1.17
  • 1.14.1
  • 1.16.0
  • 1.16
  • 1.15.1
  • 1.15.0
  • 1.15
  • 1.14
  • 1.13
  • 1.12
  • 1.11
  • 1.10
  • 1.9
  • Lime-Seal
  • 1.8
  • 1.7
  • 1.6
  • 1.5
  • 1.4
  • 1.3
23 results

setup.py

Blame
  • test_organization.py 781 B
    import json
    import jsonschema
    from compendium_v2.routes.organization import ORGANIZATION_RESPONSE_SCHEMA
    
    
    def test_parentorganization_response(client, test_organization_data):
        rv = client.get(
            '/api/organization/parent',
            headers={'Accept': ['application/json']})
        assert rv.status_code == 200
        result = json.loads(rv.data.decode('utf-8'))
        jsonschema.validate(result, ORGANIZATION_RESPONSE_SCHEMA)
        assert result
    
    
    def test_suborganization_response(client, test_organization_data):
        rv = client.get(
            '/api/organization/sub',
            headers={'Accept': ['application/json']})
        assert rv.status_code == 200
        result = json.loads(rv.data.decode('utf-8'))
        jsonschema.validate(result, ORGANIZATION_RESPONSE_SCHEMA)
        assert result