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

[Enhancement] : Add testing ability to middleware for PATCH | PUT file upload #847

Open
mshemuni opened this issue Sep 11, 2023 · 0 comments

Comments

@mshemuni
Copy link

Hello

I am trying to create a simple dictionary application using Django and support it with a Web API using Django-ninja. Two of the fields I use have FileField. Adding files using Django-ninja was not a problem. However, creating an endpoint for PUT and PATCH was problematic but I solved it according to #719.

The ability to upload files using PUT and PATCH was confirmed using the swagger. However, I cannot create a test case using Django's TestCase to test the endpoint. It still sends None instead of the file.

Can we have a way to create unit tests that are able to send files via PUT and PATCH?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant