Skip to content
Snippets Groups Projects
Verified Commit 074fdd51 authored by Eliot Berriot's avatar Eliot Berriot
Browse files

Removed /api in paths

parent cf0aee3d
No related branches found
No related tags found
No related merge requests found
...@@ -18,9 +18,9 @@ application = ProtocolTypeRouter( ...@@ -18,9 +18,9 @@ application = ProtocolTypeRouter(
{ {
"http": URLRouter( "http": URLRouter(
[ [
url(r"^api/v1/search/$", consumers.SearchMultipleConsumer), url(r"^v1/search/$", consumers.SearchMultipleConsumer),
url( url(
r"^api/v1/search/(?P<lookup_type>.+):(?P<lookup>.+)$", r"^v1/search/(?P<lookup_type>.+):(?P<lookup>.+)$",
consumers.SearchSingleConsumer, consumers.SearchSingleConsumer,
), ),
url(r"", AsgiHandler), url(r"", AsgiHandler),
......
...@@ -16,7 +16,7 @@ async def test_search_consumer_success( ...@@ -16,7 +16,7 @@ async def test_search_consumer_success(
sources, "result_to_retribute_profile", return_value=expected sources, "result_to_retribute_profile", return_value=expected
) )
communicator = HttpCommunicator( communicator = HttpCommunicator(
application, "GET", "/api/v1/search/webfinger:test@user.domain" application, "GET", "/v1/search/webfinger:test@user.domain"
) )
response = await communicator.get_response() response = await communicator.get_response()
assert get.call_args[0][0] == "test@user.domain" assert get.call_args[0][0] == "test@user.domain"
...@@ -59,7 +59,7 @@ async def test_search_multiple(loop, application, mocker, coroutine_mock, dummyc ...@@ -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"]} query = {"lookups": ["webfinger:1", "webfinger:2", "webfinger:3", "webfinger:4"]}
communicator = HttpCommunicator( 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() response = await communicator.get_response()
assert response["status"] == 200 assert response["status"] == 200
......
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