Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
api
Manage
Activity
Members
Labels
Plan
Issues
5
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
retribute.me
api
Commits
074fdd51
Verified
Commit
074fdd51
authored
5 years ago
by
Eliot Berriot
Browse files
Options
Downloads
Patches
Plain Diff
Removed /api in paths
parent
cf0aee3d
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
config/routing.py
+2
-2
2 additions, 2 deletions
config/routing.py
tests/search/test_consumers.py
+2
-2
2 additions, 2 deletions
tests/search/test_consumers.py
with
4 additions
and
4 deletions
config/routing.py
+
2
−
2
View file @
074fdd51
...
@@ -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
),
...
...
This diff is collapsed.
Click to expand it.
tests/search/test_consumers.py
+
2
−
2
View file @
074fdd51
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment