-
Notifications
You must be signed in to change notification settings - Fork 7
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
Should IntegrationTestCase use self.client.get()? #34
Comments
I rest my case. |
Much slower. We should always aim for fast tests execution. More args to come... eventually.. |
Yes, it's slower, but we need a test that goes through the url resolving/middleware etc. The majority of tests should be normal unit tests, but to test that things have been wired up correctly, we need a true integration test. Remember that this class was intended to replace the more trivial selenium tests. They are slow, but to truly replace them, we should be doing end-to-end tests. |
As an example, I've just written this for another project, testing that a form (built in
It would be good to roll not only the client setup (not necessarily in setUp, but perhaps in a helper method) but also some elements of the counting assertion into Asserting that dictionaries correlate using subTest like that seems useful, and we can possibly build other test methods on top of it (for instance, one that takes the equivalent of |
@adam-incuna Looks like it could be worthwhile. |
👍 |
Idea (@Ian-Foote you'll like this): A |
Could be shiny. There may be some hidden pitfalls though. |
Yes. I'll probably find out what they are by just writing it. :P Let me know if you think of anything! |
We have the option to use
self.client.get()
instead of view classes.Pros:
Cons:
client.get()
.HTTPRequest
objects.@incuna/backend opinions?
The text was updated successfully, but these errors were encountered: