-
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
feat: adding support for Django Ninja test client #33
Conversation
72c78a1
to
00a0362
Compare
Sorry for invading your PR like this, but I didn't know where to request this 😬. When you have the time, could you create a release for the master? 🙏 (also maybe enabling the Discussions tab would be nice for handling this kind of communication) |
00a0362
to
af18602
Compare
Hi @danut-t, just triggered 1.3.1 release 🚀 |
5454e18
to
2b4f982
Compare
2b4f982
to
7a1c573
Compare
7a1c573
to
c18e928
Compare
Hey, this MR broke my pipeline, as I do not use
See also the following output:
It would be good if an optional import would be done here and to not fail if Of course, a few workarounds are possible, e.g. installing |
Context
As specified in Django Ninja documentation, despite being compatible with Django Test Client, using Django Ninja Test Client for Django Ninja APIs ends up being more efficient and faster. Adding therefore support for it in this PR, so that django ninja projects, which already use ninja test client, can switch smoothly to the new client added here.
Changes
OpenAPINinjaClient
, which extendsninja.testing.TestClient
GenericRequest
class and adapting schema tester to be compatible with both Django a Django Ninja test clients.json
payloads for Django Test Client, as code was repetitive in each method.