-
Notifications
You must be signed in to change notification settings - Fork 0
Adds assets pagination #353
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@GianlucaFicarelli Take a look please. The only problem now is test_get_entity_assets is failing cause now when not entity or assets found is just giving back and empty page instead of 404 error. Should I change the test or give back 404 when empty page? |
I was expecting an error when calling |
8086c85
to
0e31328
Compare
I changed the failing test to accept an empty list as entity not found |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I'll wait if @eleftherioszisis and @mgeplf have any comment! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks reasonable to me
c44c70f
to
d8d3673
Compare
@eleftherioszisis @GianlucaFicarelli @mgeplf I set back the authorization check for get_assets and added tests to verify authorization |
tests/routers/test_asset.py
Outdated
@@ -103,7 +103,7 @@ def asset_directory(db, root_circuit, person_id) -> Asset: | |||
return asset | |||
|
|||
|
|||
def test_upload_entity_asset(client, entity): | |||
def test_upload_entity_asset(client, client_user_2, entity): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good call on testing non-authorized.
I wonder if the non-authorization tests can be moved to separate tests, and parameterized also on user_context_no_project
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
d8d3673
to
37876f2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Adapts asset service to router_read_many approach standardizing and getting by its pagination system