Skip to content
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

Look into using Django Ninja test client instead of live_server #32

Open
mrchrisadams opened this issue Nov 18, 2024 · 0 comments
Open
Labels
help wanted Extra attention is needed quality of life Issues that make working on the codebase easier

Comments

@mrchrisadams
Copy link
Member

At present we use the pytest django live_server fixture when testing some API responses in the test_api_external.py file. these work, but using the entire live_server is slow.

There is a way to use a special router in Django Ninja - this would allow us to use the more lightweight Django test client, giving us faster tests, but involves a bit of work to get pytest and django ninja to work together - maybe even introducing a Router class.

It's not urgent, would be useful to have implemented.

https://django-ninja.dev/guides/testing/

@mrchrisadams mrchrisadams added the help wanted Extra attention is needed label Nov 18, 2024
@mrchrisadams mrchrisadams added the quality of life Issues that make working on the codebase easier label Nov 25, 2024
@mrchrisadams mrchrisadams changed the title Look into using Django Nina test client instead of live_server Look into using Django Ninja test client instead of live_server Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed quality of life Issues that make working on the codebase easier
Projects
None yet
Development

No branches or pull requests

1 participant