-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add as_user flag to jobs fetch #431
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #431 +/- ##
==========================================
+ Coverage 85.15% 85.83% +0.68%
==========================================
Files 28 28
Lines 916 925 +9
==========================================
+ Hits 780 794 +14
+ Misses 136 131 -5 ☔ View full report in Codecov by Sentry. |
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.
Can we add the following tests to ensure execution branches are covered for jobs all:
- As user is on and user, (should be default behaviour)
- As user is off and user, (should be default behaviour)
Can we add the following tests to ensure execution branches are covered for jobs individual instrument:
- As user is on and staff
- As user is on and user, (should be default behaviour)
- As user is off and user, (should be default behaviour)
test/e2e/test_core.py
Outdated
assert len(response.json()) == expected_number_of_jobs | ||
|
||
|
||
# def test_get_jobs_as_user_but_not_staff(): |
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.
Can we not have commented out tests?
Closes #fiaisis/frontend#357
Description
Adds a
as_user
flag to the jobs endpoint which when true ignores whether the request was made by staff or not.