Skip to content
Myr

remove BaseRequest and BaseResponse

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by David Lord · committed by David Lord · parent fdba0d2 · Browse files · 5 files+5 added−5 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

5 files+5 added−5 removed

  • other:+5 added−5 removed

5 files+5 added−5 removed

modified:docs/tutorial/tests.rst+1 added-1 removed
300 unmodified lines
301302:attr:`~Response.data` contains the body of the response as bytes. If303you expect a certain value to render on the page, check that it's in304``data``. Bytes must be compared to bytes. If you want to compare text,305use :meth:`get_data(as_text=True) <werkzeug.wrappers.BaseResponse.get_data>`305use :meth:`get_data(as_text=True) <werkzeug.wrappers.Response.get_data>`306instead.307308``pytest.mark.parametrize`` tells Pytest to run the same test function309with different arguments. You use it here to test different invalid
252 unmodified lines
modified:docs/testing.rst+1 added-1 removed
117 unmodified lines
118119By using ``client.get`` we can send an HTTP ``GET`` request to the120application with the given path. The return value will be a121:class:`~flask.Flask.response_class` object. We can now use the122:attr:`~werkzeug.wrappers.BaseResponse.data` attribute to inspect122:attr:`~werkzeug.wrappers.Response.data` attribute to inspect123the return value (as string) from the application.124In this case, we ensure that ``'No entries here so far'``125is part of the output.126
336 unmodified lines
modified:src/flask/app.py+1 added-1 removed
14 unmodified lines
15from werkzeug.routing import Map16from werkzeug.routing import RequestRedirect17from werkzeug.routing import RoutingException18from werkzeug.routing import Rule19from werkzeug.wrappers import BaseResponse19from werkzeug.wrappers import Response as BaseResponse2021from . import cli22from . import json23from .config import Config
2019 unmodified lines
modified:src/flask/testing.py+1 added-1 removed
3 unmodified lines
4import werkzeug.test5from click.testing import CliRunner6from werkzeug.test import Client7from werkzeug.urls import url_parse8from werkzeug.wrappers import BaseRequest8from werkzeug.wrappers import Request as BaseRequest910from . import _request_ctx_stack11from .cli import ScriptInfo12from .json import dumps as json_dumps
249 unmodified lines
modified:src/flask/wrappers.py+1 added-1 removed
111 unmodified lines
112 @property113 def max_cookie_size(self):114 """Read-only view of the :data:`MAX_COOKIE_SIZE` config key.115116 See :attr:`~werkzeug.wrappers.BaseResponse.max_cookie_size` in116 See :attr:`~werkzeug.wrappers.Response.max_cookie_size` in117 Werkzeug's docs.118 """119 if current_app:120 return current_app.config["MAX_COOKIE_SIZE"]
3 unmodified lines