Select Git revision
test_charging_structure.py
test_charging_structure.py 450 B
import json
import jsonschema
from compendium_v2.routes.charging import CHARGING_STRUCTURE_RESPONSE_SCHEMA
def test_charging_structure_response(client, test_charging_structure_data):
rv = client.get(
'/api/charging/',
headers={'Accept': ['application/json']})
assert rv.status_code == 200
result = json.loads(rv.data.decode('utf-8'))
jsonschema.validate(result, CHARGING_STRUCTURE_RESPONSE_SCHEMA)
assert result