-
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
fix: making import of ninja optional #42
fix: making import of ninja optional #42
Conversation
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.
Thanks for taking a look at my comment and working on it.
See my review comment, I think in the current form the fix does not work yet. Would be nice if you could take another look on it
c7b45e6
to
48d708b
Compare
My test integration is still failing, but I guess for unrelated reasons. I'm using |
With the fix of changing schema_tester.validate_response(response) to schema_tester.validate_response(DRFResponseHandler(response)) my pipeline works again with your proposed patch. I mean it makes sense that it starts breaking if you change the API. Here the question would be whether it makes sense to have a breaking API change or whether it would be a better idea to go with the previous code of response_handler = ResponseHandlerFactory.create(response) and integrate the detection "which type of response is it? DRF or Django Ninja?" there. Anyways, I consider this comment to be out of scope for this PR and can confirm that the patch works. |
48d708b
to
0bbe5ac
Compare
@StopMotionCuber indeed I will then merge this PR and trigger a release so that the issue with the absence of |
0bbe5ac
to
3ff799c
Compare
As reported by @StopMotionCuber, after we introduced support for Django-Ninja's test client within the module
clients.py
, projects which doesn't haveninja
installed began failing when attempting to import the former client.This PR aims to fix this issue while defining an optional import and validation of the
ninja
library.