-
Notifications
You must be signed in to change notification settings - Fork 1
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
Update tests and remove unused code #18
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## next #18 +/- ##
===========================================
+ Coverage 76.82% 86.95% +10.13%
===========================================
Files 10 10
Lines 302 276 -26
===========================================
+ Hits 232 240 +8
+ Misses 70 36 -34 ☔ 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.
This PR removes some unused code and adds new tests covering uploading JSON data, requests for non-existing data, unauthorized requests and authorization within sessions. Looks good to me 👌
else: | ||
raise PermissionDenied | ||
return HttpResponse(status=401) |
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.
👌
|
||
def test_session(self): | ||
# once you authenicate once with username and password you should be able to reuse the session with credentials | ||
session = requests.Session() |
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.
cool, I didn't know it worked with sessions
Ref 5462: LiveDataServer: Enhance (Add) Tests
This adds tests to cover all the endpoints used.
I removed the endpoint
/plots/$instrument/$run_number/
as it was not used by anything that I know of. It also included an old version of jquery with known vulnerabilities so nobody should be using it.I also did a small amount of code improvements as I seen things.
Short description of the changes:
Long description of the changes:
Check list for the pull request
Check list for the reviewer
Manual test for the reviewer
References