-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
correct variable name in testing docs #913
correct variable name in testing docs #913
Conversation
|
||
TestClient can also be used as a contextmanager, returning | ||
the instance of itself instantiated. | ||
""" | ||
|
||
def __init__(self, app, protocol="http"): | ||
self._app = app | ||
self.app = app |
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.
Why did you covert app
to public name?
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.
Yes, was about to make a comment about this.
Very often in tests it's helpful to get access to the app
eg. to get the db connection and check data has changed as expected.
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.
Since aiohttp encourages app
holding all variables this is basically the test client's only way of getting access to serverside data.
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.
Ok
thanks |
What do these changes do?
Correct variable name in pytest section of testing docs
Checklist