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

re-enable /data/version test outside of per-router config

parent 6c5cb20f
No related branches found
No related tags found
No related merge requests found
......@@ -18,33 +18,6 @@ DEFAULT_REQUEST_HEADERS = {
}
# def test_version_request(router, client):
# version_schema = {
# "$schema": "http://json-schema.org/draft-07/schema#",
# "type": "object",
# "properties": {
# "api": {
# "type": "string",
# "pattern": r'\d+\.\d+'
# },
# "module": {
# "type": "string",
# "pattern": r'\d+\.\d+'
# }
# },
# "required": ["api", "module"],
# "additionalProperties": False
# }
#
# rv = client.post(
# "data/version",
# headers=DEFAULT_REQUEST_HEADERS)
# assert rv.status_code == 200
# jsonschema.validate(
# json.loads(rv.data.decode("utf-8")),
# version_schema)
class MockedRedis(object):
db = None
......
import json
import jsonschema
DEFAULT_REQUEST_HEADERS = {
"Content-type": "application/json",
"Accept": ["application/json"]
}
def test_version_request(client):
version_schema = {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"api": {
"type": "string",
"pattern": r'\d+\.\d+'
},
"module": {
"type": "string",
"pattern": r'\d+\.\d+'
}
},
"required": ["api", "module"],
"additionalProperties": False
}
rv = client.post(
"data/version",
headers=DEFAULT_REQUEST_HEADERS)
assert rv.status_code == 200
jsonschema.validate(
json.loads(rv.data.decode("utf-8")),
version_schema)
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