-
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 good document streaming endpoint #1818
Add good document streaming endpoint #1818
Conversation
76ccb5b
to
2ebd65a
Compare
7dc6ed7
to
89839a8
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.
Some things to consider. View full project report here.
89839a8
to
d3afc51
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.
Worth considering. View full project report here.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #1818 +/- ##
==========================================
+ Coverage 89.90% 89.92% +0.01%
==========================================
Files 319 320 +1
Lines 17682 17711 +29
Branches 2249 2250 +1
==========================================
+ Hits 15897 15926 +29
Misses 1285 1285
Partials 500 500 ☔ View full report in Codecov by Sentry. |
GoodStatus.SUBMITTED, | ||
GoodStatus.QUERY, | ||
GoodStatus.VERIFIED, |
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.
I can see these are the "not draft" statuses, and that they test the logic above obj.good.status == GoodStatus.DRAFT
, but I can't see here how a good gets draft status to begin with. I'm guessing it is because there is default=GoodStatus.DRAFT
in the good model? and therefore it is not worth having test cases to test the document stream works for the draft status (as it is the default)?
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.
The test that checks that the stream works is the first one, it doesn't explicitly set the status as it's already being set by the default value, as you said, so there is a test already. I can explicitly set this to make it clearer.
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 good, just added a question
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.
One minor comment, otherwise looking good
from api.organisations.libraries.get_organisation import get_request_user_organisation_id | ||
|
||
|
||
class IsDocumentInOrganisation(permissions.BasePermission): |
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.
It might be good to unit test these permissions
d16bb86
to
b874f40
Compare
Aim
Add good document streaming endpoint.
LTD-4679