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
Add an exemple of unittest usage #369
Conversation
Codecov Report
@@ Coverage Diff @@
## master #369 +/- ##
=======================================
Coverage 96.51% 96.51%
=======================================
Files 3 3
Lines 1319 1319
=======================================
Hits 1273 1273
Misses 46 46 Continue to review full report at Codecov.
|
|
||
def setUp(): | ||
self.responses = responses.RequestsMock() | ||
self.responses.start() |
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.
It would be good to give some context on this example and why you would use this instead of using the decorators. Perhaps explaining that this approach can be used when multiple test methods need to use the same mocks?
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.
Good idea. I've tried to add a description of the example, but I'm not sure the text is correct
(In the meanwhile I've switched to using pytest fixtures ^^)
This is a simple example of usage inside a classic unittest setUp() clause
8e2cd6e
to
764c78f
Compare
Thank you 👍 |
This is a simple example of usage inside a classic unittest setUp() clause