Skip to content

Commit

Permalink
fix: pytest urls
Browse files Browse the repository at this point in the history
  • Loading branch information
sanjibansg committed Feb 1, 2024
1 parent bf7f30d commit dd18220
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions api/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def test_validate_json():
"plan": plan,
"override_levels": [2001, 1],
}
response = client.post("/route/validate/", json=data,
response = client.post("/api/route/validate/", json=data,
headers={"Host": "127.0.0.1"})
assert response.status_code == 200

Expand All @@ -40,7 +40,7 @@ def test_validate_binary():
file = file_stream.read()

response = client.post(
"/route/validate/file/",
"/api/route/validate/file/",
data={"override_levels": [1002, 2001]},
files={"file": ("q1.bin", file, "application/octet-stream")},
headers={"Host": "127.0.0.1"}
Expand Down Expand Up @@ -68,7 +68,7 @@ def test_add_schema():
}
'''
response = client.post(
"/route/add_schema/",
"/api/route/add_schema/",
json={
"schema": schema
},
Expand All @@ -86,7 +86,7 @@ def test_parse_to_substrait():
algorithm="HS256")

response = client.post(
"/route/parse/",
"/api/route/parse/",
json={
"query": "SELECT * FROM lineitem;",
},
Expand All @@ -109,10 +109,10 @@ def test_save_plan_roundtrip():
"json_string": json_string,
"validator_overrides": [2001, 1],
}
response = client.post("/route/save/", json=data, headers={"Host": "127.0.0.1"})
response = client.post("/api/route/save/", json=data, headers={"Host": "127.0.0.1"})
assert response.status_code == 200

response = client.post("/route/fetch/?id=" + response.json(),
response = client.post("/api/route/fetch/?id=" + response.json(),
headers={"Host": "127.0.0.1"})
assert response.status_code == 200
assert response.json()["json_string"] == json_string
Expand Down

0 comments on commit dd18220

Please sign in to comment.