-
-
Notifications
You must be signed in to change notification settings - Fork 334
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
Create RequestFactory
to eventually replace create_test_request
#497
Conversation
This looks good! Please add doc strings to all methods, even private ones, and add a doc string to the |
Thanks @Goldziher , added here: f68b46a |
@Goldziher is it safe to merge? |
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.
Should add docs: https://starlite-api.github.io/starlite/usage/14-testing/#creating-a-test-request and also add the class and public members to reference docs: https://github.com/starlite-api/starlite/blob/main/docs/reference/testing.md
@peterschutt I think I'll do it as part of the next PR which removes |
merge when ready |
When thinking about it again, since
This decision also affects the documentation we want to add about the new |
It should be deprecated if we are to remove it. Can you re-implement it so that keeps the same interface but uses |
Yes sure, that's a good idea. So I'll update the documentation in this PR and mention |
Sounds reasonable to me. If it isn't hard to implement it using |
ok sure, I'll do it in a separate PR |
Addresses issue #459
To make it easier to review, this PR only adds
RequestFactory
and doesn't removecreate_test_request
. Once this is merged I'll open another PR to replace and removecreate_test_request
The
RequestFactory
is heavily inspired by Django'sRequestFactory
PR Checklist
CONTRIBUTING.md
?