Skip to content
Snippets Groups Projects
Commit ea210e01 authored by Erik Reid's avatar Erik Reid
Browse files

add tests of /data/* routes

parent a879b9f0
No related branches found
No related tags found
No related merge requests found
import json
import jsonschema
DEFAULT_REQUEST_HEADERS = {
"Content-type": "application/json",
"Accept": ["application/json"]
}
def test_get_routers(client):
version_schema = {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "array",
"items": {"type": "string"}
}
rv = client.post(
"data/routers",
headers=DEFAULT_REQUEST_HEADERS)
assert rv.status_code == 200
response = json.loads(rv.data.decode("utf-8"))
jsonschema.validate(response, version_schema)
assert response
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment