diff --git a/docs/testing.rst b/docs/testing.rst index 942a4e4d..2fedc600 100644 --- a/docs/testing.rst +++ b/docs/testing.rst @@ -119,7 +119,7 @@ Notice that our test functions begin with the word `test`; this allows By using ``client.get`` we can send an HTTP ``GET`` request to the application with the given path. The return value will be a :class:`~flask.Flask.response_class` object. We can now use the -:attr:`~werkzeug.wrappers.BaseResponse.data` attribute to inspect +:attr:`~werkzeug.wrappers.Response.data` attribute to inspect the return value (as string) from the application. In this case, we ensure that ``'No entries here so far'`` is part of the output. diff --git a/docs/tutorial/tests.rst b/docs/tutorial/tests.rst index 079aeaa1..d8f2a931 100644 --- a/docs/tutorial/tests.rst +++ b/docs/tutorial/tests.rst @@ -302,7 +302,7 @@ URL when the register view redirects to the login view. :attr:`~Response.data` contains the body of the response as bytes. If you expect a certain value to render on the page, check that it's in ``data``. Bytes must be compared to bytes. If you want to compare text, -use :meth:`get_data(as_text=True) ` +use :meth:`get_data(as_text=True) ` instead. ``pytest.mark.parametrize`` tells Pytest to run the same test function diff --git a/src/flask/app.py b/src/flask/app.py index 34ca3700..4cbad04b 100644 --- a/src/flask/app.py +++ b/src/flask/app.py @@ -16,7 +16,7 @@ from werkzeug.routing import Map from werkzeug.routing import RequestRedirect from werkzeug.routing import RoutingException from werkzeug.routing import Rule -from werkzeug.wrappers import BaseResponse +from werkzeug.wrappers import Response as BaseResponse from . import cli from . import json diff --git a/src/flask/testing.py b/src/flask/testing.py index a316bf42..247e6605 100644 --- a/src/flask/testing.py +++ b/src/flask/testing.py @@ -5,7 +5,7 @@ import werkzeug.test from click.testing import CliRunner from werkzeug.test import Client from werkzeug.urls import url_parse -from werkzeug.wrappers import BaseRequest +from werkzeug.wrappers import Request as BaseRequest from . import _request_ctx_stack from .cli import ScriptInfo diff --git a/src/flask/wrappers.py b/src/flask/wrappers.py index 279561a6..1d8f17d7 100644 --- a/src/flask/wrappers.py +++ b/src/flask/wrappers.py @@ -113,7 +113,7 @@ class Response(ResponseBase): def max_cookie_size(self): """Read-only view of the :data:`MAX_COOKIE_SIZE` config key. - See :attr:`~werkzeug.wrappers.BaseResponse.max_cookie_size` in + See :attr:`~werkzeug.wrappers.Response.max_cookie_size` in Werkzeug's docs. """ if current_app: