Verified Commit 074fdd51 authored by Eliot Berriot's avatar Eliot Berriot
Browse files

Removed /api in paths

parent cf0aee3d
......@@ -18,9 +18,9 @@ application = ProtocolTypeRouter(
{
"http": URLRouter(
[
url(r"^api/v1/search/$", consumers.SearchMultipleConsumer),
url(r"^v1/search/$", consumers.SearchMultipleConsumer),
url(
r"^api/v1/search/(?P<lookup_type>.+):(?P<lookup>.+)$",
r"^v1/search/(?P<lookup_type>.+):(?P<lookup>.+)$",
consumers.SearchSingleConsumer,
),
url(r"", AsgiHandler),
......
......@@ -16,7 +16,7 @@ async def test_search_consumer_success(
sources, "result_to_retribute_profile", return_value=expected
)
communicator = HttpCommunicator(
application, "GET", "/api/v1/search/webfinger:test@user.domain"
application, "GET", "/v1/search/webfinger:test@user.domain"
)
response = await communicator.get_response()
assert get.call_args[0][0] == "test@user.domain"
......@@ -59,7 +59,7 @@ async def test_search_multiple(loop, application, mocker, coroutine_mock, dummyc
)
query = {"lookups": ["webfinger:1", "webfinger:2", "webfinger:3", "webfinger:4"]}
communicator = HttpCommunicator(
application, "POST", "/api/v1/search/", body=json.dumps(query).encode()
application, "POST", "/v1/search/", body=json.dumps(query).encode()
)
response = await communicator.get_response()
assert response["status"] == 200
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment