Mock Version: 4.1 Mock Version: 4.1 Mock Version: 4.1 ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --noclean --target noarch --nodeps /builddir/build/SPECS/python-flask.spec'], chrootPath='/var/lib/mock/dist-ocs23-python311-build-86830-4752/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'}shell=Falselogger=timeout=86400uid=981gid=135user='mockbuild'nspawn_args=[]unshare_net=TrueprintOutput=False) Executing command: ['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --noclean --target noarch --nodeps /builddir/build/SPECS/python-flask.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'} and shell False Building target platforms: noarch Building for target noarch Wrote: /builddir/build/SRPMS/python-flask-2.1.3-5.ocs23.src.rpm Child return code was: 0 ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -bb --noclean --target noarch --nodeps /builddir/build/SPECS/python-flask.spec'], chrootPath='/var/lib/mock/dist-ocs23-python311-build-86830-4752/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'}shell=Falselogger=timeout=86400uid=981gid=135user='mockbuild'nspawn_args=[]unshare_net=TrueprintOutput=False) Executing command: ['bash', '--login', '-c', '/usr/bin/rpmbuild -bb --noclean --target noarch --nodeps /builddir/build/SPECS/python-flask.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'} and shell False Building target platforms: noarch Building for target noarch Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.0rkKNN + umask 022 + cd /builddir/build/BUILD + cd /builddir/build/BUILD + rm -rf Flask-2.1.3 + /usr/lib/rpm/rpmuncompress -x /builddir/build/SOURCES/Flask-2.1.3.tar.gz + STATUS=0 + '[' 0 -ne 0 ']' + cd Flask-2.1.3 + /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w . + RPM_EC=0 ++ jobs -p + exit 0 Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.rEn0K1 + umask 022 + cd /builddir/build/BUILD + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/OpenCloudOS/OpenCloudOS-hardened-cc1 -fstack-protector-strong -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' + export CFLAGS + CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/OpenCloudOS/OpenCloudOS-hardened-cc1 -fstack-protector-strong -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' + export CXXFLAGS + FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/OpenCloudOS/OpenCloudOS-hardened-cc1 -fstack-protector-strong -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -I/usr/lib/gfortran/modules' + export FFLAGS + FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/OpenCloudOS/OpenCloudOS-hardened-cc1 -fstack-protector-strong -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -I/usr/lib/gfortran/modules' + export FCFLAGS + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/OpenCloudOS/OpenCloudOS-hardened-ld -Wl,--build-id=sha1' + export LDFLAGS + LT_SYS_LIBRARY_PATH=/usr/lib: + export LT_SYS_LIBRARY_PATH + CC=gcc + export CC + CXX=g++ + export CXX + cd Flask-2.1.3 + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/OpenCloudOS/OpenCloudOS-hardened-cc1 -fstack-protector-strong -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/OpenCloudOS/OpenCloudOS-hardened-ld -Wl,--build-id=sha1' + /usr/bin/python3 setup.py build '--executable=/usr/bin/python3 -s' running build running build_py creating build creating build/lib creating build/lib/flask copying src/flask/cli.py -> build/lib/flask copying src/flask/ctx.py -> build/lib/flask copying src/flask/views.py -> build/lib/flask copying src/flask/sessions.py -> build/lib/flask copying src/flask/scaffold.py -> build/lib/flask copying src/flask/wrappers.py -> build/lib/flask copying src/flask/__main__.py -> build/lib/flask copying src/flask/typing.py -> build/lib/flask copying src/flask/logging.py -> build/lib/flask copying src/flask/__init__.py -> build/lib/flask copying src/flask/debughelpers.py -> build/lib/flask copying src/flask/signals.py -> build/lib/flask copying src/flask/templating.py -> build/lib/flask copying src/flask/config.py -> build/lib/flask copying src/flask/testing.py -> build/lib/flask copying src/flask/globals.py -> build/lib/flask copying src/flask/blueprints.py -> build/lib/flask copying src/flask/helpers.py -> build/lib/flask copying src/flask/app.py -> build/lib/flask creating build/lib/flask/json copying src/flask/json/__init__.py -> build/lib/flask/json copying src/flask/json/tag.py -> build/lib/flask/json running egg_info writing src/Flask.egg-info/PKG-INFO writing dependency_links to src/Flask.egg-info/dependency_links.txt writing entry points to src/Flask.egg-info/entry_points.txt writing requirements to src/Flask.egg-info/requires.txt writing top-level names to src/Flask.egg-info/top_level.txt reading manifest file 'src/Flask.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' no previously-included directories found matching 'docs/_build' warning: no previously-included files matching '*.pyc' found anywhere in distribution adding license file 'LICENSE.rst' writing manifest file 'src/Flask.egg-info/SOURCES.txt' copying src/flask/py.typed -> build/lib/flask + RPM_EC=0 ++ jobs -p + exit 0 Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.KseX2h + umask 022 + cd /builddir/build/BUILD + '[' /builddir/build/BUILDROOT/python-flask-2.1.3-5.ocs23.noarch '!=' / ']' + rm -rf /builddir/build/BUILDROOT/python-flask-2.1.3-5.ocs23.noarch ++ dirname /builddir/build/BUILDROOT/python-flask-2.1.3-5.ocs23.noarch + mkdir -p /builddir/build/BUILDROOT + mkdir /builddir/build/BUILDROOT/python-flask-2.1.3-5.ocs23.noarch + cd Flask-2.1.3 + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/OpenCloudOS/OpenCloudOS-hardened-cc1 -fstack-protector-strong -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/OpenCloudOS/OpenCloudOS-hardened-ld -Wl,--build-id=sha1' + /usr/bin/python3 setup.py install -O1 --skip-build --root /builddir/build/BUILDROOT/python-flask-2.1.3-5.ocs23.noarch running install /usr/lib/python3.11/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. warnings.warn( running install_lib creating /builddir/build/BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr creating /builddir/build/BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib creating /builddir/build/BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11 creating /builddir/build/BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages creating /builddir/build/BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask copying build/lib/flask/cli.py -> /builddir/build/BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask copying build/lib/flask/ctx.py -> /builddir/build/BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask copying build/lib/flask/views.py -> /builddir/build/BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask copying build/lib/flask/sessions.py -> /builddir/build/BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask copying build/lib/flask/scaffold.py -> /builddir/build/BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask copying build/lib/flask/wrappers.py -> /builddir/build/BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask copying build/lib/flask/__main__.py -> /builddir/build/BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask copying build/lib/flask/typing.py -> /builddir/build/BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask copying build/lib/flask/logging.py -> /builddir/build/BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask copying build/lib/flask/__init__.py -> /builddir/build/BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask copying build/lib/flask/debughelpers.py -> /builddir/build/BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask copying build/lib/flask/signals.py -> /builddir/build/BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask copying build/lib/flask/py.typed -> /builddir/build/BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask copying build/lib/flask/templating.py -> /builddir/build/BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask copying build/lib/flask/config.py -> /builddir/build/BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask copying build/lib/flask/testing.py -> /builddir/build/BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask copying build/lib/flask/globals.py -> /builddir/build/BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask creating /builddir/build/BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/json copying build/lib/flask/json/__init__.py -> /builddir/build/BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/json copying build/lib/flask/json/tag.py -> /builddir/build/BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/json copying build/lib/flask/blueprints.py -> /builddir/build/BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask copying build/lib/flask/helpers.py -> /builddir/build/BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask copying build/lib/flask/app.py -> /builddir/build/BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask byte-compiling /builddir/build/BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/cli.py to cli.cpython-311.pyc byte-compiling /builddir/build/BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/ctx.py to ctx.cpython-311.pyc byte-compiling /builddir/build/BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/views.py to views.cpython-311.pyc byte-compiling /builddir/build/BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/sessions.py to sessions.cpython-311.pyc byte-compiling /builddir/build/BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/scaffold.py to scaffold.cpython-311.pyc byte-compiling /builddir/build/BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/wrappers.py to wrappers.cpython-311.pyc byte-compiling /builddir/build/BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/__main__.py to __main__.cpython-311.pyc byte-compiling /builddir/build/BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/typing.py to typing.cpython-311.pyc byte-compiling /builddir/build/BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/logging.py to logging.cpython-311.pyc byte-compiling /builddir/build/BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/__init__.py to __init__.cpython-311.pyc byte-compiling /builddir/build/BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/debughelpers.py to debughelpers.cpython-311.pyc byte-compiling /builddir/build/BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/signals.py to signals.cpython-311.pyc byte-compiling /builddir/build/BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/templating.py to templating.cpython-311.pyc byte-compiling /builddir/build/BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/config.py to config.cpython-311.pyc byte-compiling /builddir/build/BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py to testing.cpython-311.pyc byte-compiling /builddir/build/BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/globals.py to globals.cpython-311.pyc byte-compiling /builddir/build/BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/json/__init__.py to __init__.cpython-311.pyc byte-compiling /builddir/build/BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/json/tag.py to tag.cpython-311.pyc byte-compiling /builddir/build/BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/blueprints.py to blueprints.cpython-311.pyc byte-compiling /builddir/build/BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/helpers.py to helpers.cpython-311.pyc byte-compiling /builddir/build/BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/app.py to app.cpython-311.pyc writing byte-compilation script '/tmp/tmp2j92j4sq.py' /usr/bin/python3 /tmp/tmp2j92j4sq.py removing /tmp/tmp2j92j4sq.py running install_egg_info running egg_info writing src/Flask.egg-info/PKG-INFO writing dependency_links to src/Flask.egg-info/dependency_links.txt writing entry points to src/Flask.egg-info/entry_points.txt writing requirements to src/Flask.egg-info/requires.txt writing top-level names to src/Flask.egg-info/top_level.txt reading manifest file 'src/Flask.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' no previously-included directories found matching 'docs/_build' adding license file 'LICENSE.rst' warning: no previously-included files matching '*.pyc' found anywhere in distribution writing manifest file 'src/Flask.egg-info/SOURCES.txt' Copying src/Flask.egg-info to /builddir/build/BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/Flask-2.1.3-py3.11.egg-info running install_scripts Installing flask script to /builddir/build/BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/bin + rm -rfv /builddir/build/BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/bin/__pycache__ + /usr/bin/find-debuginfo -j32 --strict-build-id -m -i --build-id-seed 2.1.3-5.ocs23 --unique-debug-suffix -2.1.3-5.ocs23.noarch --unique-debug-src-base python-flask-2.1.3-5.ocs23.noarch -S debugsourcefiles.list /builddir/build/BUILD/Flask-2.1.3 find: 'debug': No such file or directory + /usr/lib/rpm/check-buildroot + /usr/lib/rpm/OpenCloudOS/brp-ldconfig + /usr/lib/rpm/brp-compress + /usr/lib/rpm/OpenCloudOS/brp-strip-lto /usr/bin/strip + /usr/lib/rpm/brp-strip-static-archive /usr/bin/strip + /usr/lib/rpm/check-rpaths + /usr/lib/rpm/OpenCloudOS/brp-mangle-shebangs + /usr/lib/rpm/OpenCloudOS/brp-python-bytecompile '' 1 0 Bytecompiling .py files below /builddir/build/BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11 using python3.11 + /usr/lib/rpm/OpenCloudOS/brp-python-hardlink Executing(%check): /bin/sh -e /var/tmp/rpm-tmp.FY3hMU + umask 022 + cd /builddir/build/BUILD + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/OpenCloudOS/OpenCloudOS-hardened-cc1 -fstack-protector-strong -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' + export CFLAGS + CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/OpenCloudOS/OpenCloudOS-hardened-cc1 -fstack-protector-strong -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' + export CXXFLAGS + FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/OpenCloudOS/OpenCloudOS-hardened-cc1 -fstack-protector-strong -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -I/usr/lib/gfortran/modules' + export FFLAGS + FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/OpenCloudOS/OpenCloudOS-hardened-cc1 -fstack-protector-strong -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -I/usr/lib/gfortran/modules' + export FCFLAGS + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/OpenCloudOS/OpenCloudOS-hardened-ld -Wl,--build-id=sha1' + export LDFLAGS + LT_SYS_LIBRARY_PATH=/usr/lib: + export LT_SYS_LIBRARY_PATH + CC=gcc + export CC + CXX=g++ + export CXX + cd Flask-2.1.3 + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/OpenCloudOS/OpenCloudOS-hardened-cc1 -fstack-protector-strong -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/OpenCloudOS/OpenCloudOS-hardened-ld -Wl,--build-id=sha1' + PATH=/builddir/build/BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin + PYTHONPATH=/builddir/build/BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib64/python3.11/site-packages:/builddir/build/BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages + PYTHONDONTWRITEBYTECODE=1 + /usr/bin/pytest ============================= test session starts ============================== platform linux -- Python 3.11.4, pytest-7.4.0, pluggy-1.0.0 rootdir: /builddir/build/BUILD/Flask-2.1.3 configfile: setup.cfg testpaths: tests collected 472 items / 1 skipped tests/test_appctx.py ...F....FF..FF [ 2%] tests/test_basic.py FFFFFFF.FFF.FFFFFF..FF..FFFFFFEFFFFFFFFF.FFFFFFFFFFF [ 13%] FEEEEEEEEFFFFFFFFFFF.F.........................FFFFFFFFFFF.......FF..... [ 29%] ....F. [ 30%] tests/test_blueprints.py FFFFFFFFFFFFFFFFFF..FFF.F....FFFFF....FFFFFF.FF [ 40%] FFFFFFF..F [ 42%] tests/test_cli.py ............................................ss.s...... [ 54%] [ 54%] tests/test_config.py ................... [ 58%] tests/test_converters.py FF [ 58%] tests/test_helpers.py EEEEEEEE.FFFF.........F....... [ 64%] tests/test_instance_config.py ........... [ 67%] tests/test_json.py FFFF...FFFFFFFFFFFFFF...F.FEFFFF. [ 74%] tests/test_json_tag.py .............. [ 77%] tests/test_logging.py ...F.F [ 78%] tests/test_regression.py F [ 78%] tests/test_reqctx.py FFFFFFFssFFFFF [ 81%] tests/test_session_interface.py F [ 81%] tests/test_signals.py sssssss [ 83%] tests/test_subclassing.py F [ 83%] tests/test_templating.py FF.FFFEE....FFFF....FFFF.FF..F. [ 90%] tests/test_testing.py FEFFFFFFFFFFEFFFFFFsFF...E [ 95%] tests/test_user_error_handler.py FFFFFFFFF [ 97%] tests/test_views.py FFFFFFFFFFFF [100%] ==================================== ERRORS ==================================== ________________________ ERROR at setup of test_flashes ________________________ app = @pytest.fixture def req_ctx(app): > with app.test_request_context() as ctx: tests/conftest.py:65: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/app.py:2036: in test_request_context builder = EnvironBuilder(self, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning _____________________ ERROR at setup of test_make_response _____________________ app = @pytest.fixture def req_ctx(app): > with app.test_request_context() as ctx: tests/conftest.py:65: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/app.py:2036: in test_request_context builder = EnvironBuilder(self, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning _________ ERROR at setup of test_make_response_with_response_instance __________ app = @pytest.fixture def req_ctx(app): > with app.test_request_context() as ctx: tests/conftest.py:65: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/app.py:2036: in test_request_context builder = EnvironBuilder(self, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ________________ ERROR at setup of test_jsonify_no_prettyprint _________________ app = @pytest.fixture def req_ctx(app): > with app.test_request_context() as ctx: tests/conftest.py:65: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/app.py:2036: in test_request_context builder = EnvironBuilder(self, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning __________________ ERROR at setup of test_jsonify_prettyprint __________________ app = @pytest.fixture def req_ctx(app): > with app.test_request_context() as ctx: tests/conftest.py:65: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/app.py:2036: in test_request_context builder = EnvironBuilder(self, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ___________________ ERROR at setup of test_jsonify_mimetype ____________________ app = @pytest.fixture def req_ctx(app): > with app.test_request_context() as ctx: tests/conftest.py:65: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/app.py:2036: in test_request_context builder = EnvironBuilder(self, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning __________________ ERROR at setup of test_json_dump_dataclass __________________ app = @pytest.fixture def req_ctx(app): > with app.test_request_context() as ctx: tests/conftest.py:65: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/app.py:2036: in test_request_context builder = EnvironBuilder(self, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning _____________ ERROR at setup of test_jsonify_args_and_kwargs_check _____________ app = @pytest.fixture def req_ctx(app): > with app.test_request_context() as ctx: tests/conftest.py:65: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/app.py:2036: in test_request_context builder = EnvironBuilder(self, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ____________________ ERROR at setup of test_url_generation _____________________ app = @pytest.fixture def req_ctx(app): > with app.test_request_context() as ctx: tests/conftest.py:65: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/app.py:2036: in test_request_context builder = EnvironBuilder(self, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ________________ ERROR at setup of TestSendfile.test_send_file _________________ app = @pytest.fixture def req_ctx(app): > with app.test_request_context() as ctx: tests/conftest.py:65: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/app.py:2036: in test_request_context builder = EnvironBuilder(self, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning _______________ ERROR at setup of TestSendfile.test_static_file ________________ app = @pytest.fixture def req_ctx(app): > with app.test_request_context() as ctx: tests/conftest.py:65: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/app.py:2036: in test_request_context builder = EnvironBuilder(self, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ___________ ERROR at setup of TestSendfile.test_send_from_directory ____________ app = @pytest.fixture def req_ctx(app): > with app.test_request_context() as ctx: tests/conftest.py:65: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/app.py:2036: in test_request_context builder = EnvironBuilder(self, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ____________ ERROR at setup of TestUrlFor.test_url_for_with_anchor _____________ app = @pytest.fixture def req_ctx(app): > with app.test_request_context() as ctx: tests/conftest.py:65: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/app.py:2036: in test_request_context builder = EnvironBuilder(self, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ____________ ERROR at setup of TestUrlFor.test_url_for_with_scheme _____________ app = @pytest.fixture def req_ctx(app): > with app.test_request_context() as ctx: tests/conftest.py:65: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/app.py:2036: in test_request_context builder = EnvironBuilder(self, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ______ ERROR at setup of TestUrlFor.test_url_for_with_scheme_not_external ______ app = @pytest.fixture def req_ctx(app): > with app.test_request_context() as ctx: tests/conftest.py:65: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/app.py:2036: in test_request_context builder = EnvironBuilder(self, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ______ ERROR at setup of TestUrlFor.test_url_for_with_alternating_schemes ______ app = @pytest.fixture def req_ctx(app): > with app.test_request_context() as ctx: tests/conftest.py:65: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/app.py:2036: in test_request_context builder = EnvironBuilder(self, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ______________ ERROR at setup of TestUrlFor.test_url_with_method _______________ app = @pytest.fixture def req_ctx(app): > with app.test_request_context() as ctx: tests/conftest.py:65: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/app.py:2036: in test_request_context builder = EnvironBuilder(self, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning _____________________ ERROR at setup of test_tojson_filter _____________________ app = @pytest.fixture def req_ctx(app): > with app.test_request_context() as ctx: tests/conftest.py:65: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/app.py:2036: in test_request_context builder = EnvironBuilder(self, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning __________ ERROR at setup of test_escaping_without_template_filename ___________ app = @pytest.fixture def req_ctx(app): > with app.test_request_context() as ctx: tests/conftest.py:65: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/app.py:2036: in test_request_context builder = EnvironBuilder(self, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ________________________ ERROR at setup of test_macros _________________________ app = @pytest.fixture def req_ctx(app): > with app.test_request_context() as ctx: tests/conftest.py:65: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/app.py:2036: in test_request_context builder = EnvironBuilder(self, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ___________________ ERROR at setup of test_environ_defaults ____________________ app = @pytest.fixture def req_ctx(app): > with app.test_request_context() as ctx: tests/conftest.py:65: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/app.py:2036: in test_request_context builder = EnvironBuilder(self, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ___________ ERROR at setup of test_session_transactions_keep_context ___________ app = @pytest.fixture def req_ctx(app): > with app.test_request_context() as ctx: tests/conftest.py:65: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/app.py:2036: in test_request_context builder = EnvironBuilder(self, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning _______________ ERROR at setup of test_client_pop_all_preserved ________________ app = @pytest.fixture def req_ctx(app): > with app.test_request_context() as ctx: tests/conftest.py:65: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/app.py:2036: in test_request_context builder = EnvironBuilder(self, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning =================================== FAILURES =================================== ____________________ test_request_context_means_app_context ____________________ app = def test_request_context_means_app_context(app): > with app.test_request_context(): tests/test_appctx.py:31: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/app.py:2036: in test_request_context builder = EnvironBuilder(self, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning _________ test_app_tearing_down_with_handled_exception_by_app_handler __________ app = , client = > def test_app_tearing_down_with_handled_exception_by_app_handler(app, client): app.config["PROPAGATE_EXCEPTIONS"] = True cleanup_stuff = [] @app.teardown_appcontext def cleanup(exception): cleanup_stuff.append(exception) @app.route("/") def index(): raise Exception("dummy") @app.errorhandler(Exception) def handler(f): return flask.jsonify(str(f)) with app.app_context(): > client.get("/") tests/test_appctx.py:106: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ________________ test_app_tearing_down_with_unhandled_exception ________________ app = , client = > def test_app_tearing_down_with_unhandled_exception(app, client): app.config["PROPAGATE_EXCEPTIONS"] = True cleanup_stuff = [] @app.teardown_appcontext def cleanup(exception): cleanup_stuff.append(exception) @app.route("/") def index(): raise Exception("dummy") with pytest.raises(Exception, match="dummy"): with app.app_context(): > client.get("/") tests/test_appctx.py:125: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning During handling of the above exception, another exception occurred: app = , client = > def test_app_tearing_down_with_unhandled_exception(app, client): app.config["PROPAGATE_EXCEPTIONS"] = True cleanup_stuff = [] @app.teardown_appcontext def cleanup(exception): cleanup_stuff.append(exception) @app.route("/") def index(): raise Exception("dummy") > with pytest.raises(Exception, match="dummy"): E AssertionError: Regex pattern did not match. E Regex: 'dummy' E Input: "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead." tests/test_appctx.py:123: AssertionError ____________________________ test_context_refcounts ____________________________ app = , client = > def test_context_refcounts(app, client): called = [] @app.teardown_request def teardown_req(error=None): called.append("request") @app.teardown_appcontext def teardown_app(error=None): called.append("app") @app.route("/") def index(): with flask._app_ctx_stack.top: with flask._request_ctx_stack.top: pass env = flask._request_ctx_stack.top.request.environ assert env["werkzeug.request"] is not None return "" > res = client.get("/") tests/test_appctx.py:185: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ________________________________ test_clean_pop ________________________________ app = def test_clean_pop(app): app.testing = False called = [] @app.teardown_request def teardown_req(error=None): 1 / 0 @app.teardown_appcontext def teardown_app(error=None): called.append("TEARDOWN") try: > with app.test_request_context(): tests/test_appctx.py:204: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/app.py:2036: in test_request_context builder = EnvironBuilder(self, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ______________________________ test_options_work _______________________________ app = , client = > def test_options_work(app, client): @app.route("/", methods=["GET", "POST"]) def index(): return "Hello World" > rv = client.open("/", method="OPTIONS") tests/test_basic.py:34: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ________________________ test_options_on_multiple_rules ________________________ app = , client = > def test_options_on_multiple_rules(app, client): @app.route("/", methods=["GET", "POST"]) def index(): return "Hello World" @app.route("/", methods=["PUT"]) def index_put(): return "Aha!" > rv = client.open("/", method="OPTIONS") tests/test_basic.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ____________________________ test_method_route[get] ____________________________ app = , client = > method = 'get' @pytest.mark.parametrize("method", ["get", "post", "put", "delete", "patch"]) def test_method_route(app, client, method): method_route = getattr(app, method) client_method = getattr(client, method) @method_route("/") def hello(): return "Hello" > assert client_method("/").data == b"Hello" tests/test_basic.py:61: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ___________________________ test_method_route[post] ____________________________ app = , client = > method = 'post' @pytest.mark.parametrize("method", ["get", "post", "put", "delete", "patch"]) def test_method_route(app, client, method): method_route = getattr(app, method) client_method = getattr(client, method) @method_route("/") def hello(): return "Hello" > assert client_method("/").data == b"Hello" tests/test_basic.py:61: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1248: in post return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ____________________________ test_method_route[put] ____________________________ app = , client = > method = 'put' @pytest.mark.parametrize("method", ["get", "post", "put", "delete", "patch"]) def test_method_route(app, client, method): method_route = getattr(app, method) client_method = getattr(client, method) @method_route("/") def hello(): return "Hello" > assert client_method("/").data == b"Hello" tests/test_basic.py:61: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1253: in put return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning __________________________ test_method_route[delete] ___________________________ app = , client = > method = 'delete' @pytest.mark.parametrize("method", ["get", "post", "put", "delete", "patch"]) def test_method_route(app, client, method): method_route = getattr(app, method) client_method = getattr(client, method) @method_route("/") def hello(): return "Hello" > assert client_method("/").data == b"Hello" tests/test_basic.py:61: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1258: in delete return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ___________________________ test_method_route[patch] ___________________________ app = , client = > method = 'patch' @pytest.mark.parametrize("method", ["get", "post", "put", "delete", "patch"]) def test_method_route(app, client, method): method_route = getattr(app, method) client_method = getattr(client, method) @method_route("/") def hello(): return "Hello" > assert client_method("/").data == b"Hello" tests/test_basic.py:61: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1263: in patch return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning _____________________ test_provide_automatic_options_attr ______________________ def test_provide_automatic_options_attr(): app = flask.Flask(__name__) def index(): return "Hello World!" index.provide_automatic_options = False app.route("/")(index) > rv = app.test_client().open("/", method="OPTIONS") tests/test_basic.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning _____________________ test_provide_automatic_options_kwarg _____________________ app = , client = > def test_provide_automatic_options_kwarg(app, client): def index(): return flask.request.method def more(): return flask.request.method app.add_url_rule("/", view_func=index, provide_automatic_options=False) app.add_url_rule( "/more", view_func=more, methods=["GET", "POST"], provide_automatic_options=False, ) > assert client.get("/").data == b"GET" tests/test_basic.py:105: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ___________________________ test_request_dispatching ___________________________ app = , client = > def test_request_dispatching(app, client): @app.route("/") def index(): return flask.request.method @app.route("/more", methods=["GET", "POST"]) def more(): return flask.request.method > assert client.get("/").data == b"GET" tests/test_basic.py:137: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning _______________________________ test_url_mapping _______________________________ app = , client = > def test_url_mapping(app, client): random_uuid4 = "7eb41166-9ebf-4d26-b771-ea3f54f8b383" def index(): return flask.request.method def more(): return flask.request.method def options(): return random_uuid4 app.add_url_rule("/", "index", index) app.add_url_rule("/more", "more", more, methods=["GET", "POST"]) # Issue 1288: Test that automatic options are not added # when non-uppercase 'options' in methods app.add_url_rule("/options", "options", options, methods=["options"]) > assert client.get("/").data == b"GET" tests/test_basic.py:175: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ____________________________ test_werkzeug_routing _____________________________ app = , client = > def test_werkzeug_routing(app, client): from werkzeug.routing import Submount, Rule app.url_map.add( Submount("/foo", [Rule("/bar", endpoint="bar"), Rule("/", endpoint="index")]) ) def bar(): return "bar" def index(): return "index" app.view_functions["bar"] = bar app.view_functions["index"] = index > assert client.get("/foo/").data == b"index" tests/test_basic.py:208: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/foo/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ___________________________ test_endpoint_decorator ____________________________ app = , client = > def test_endpoint_decorator(app, client): from werkzeug.routing import Submount, Rule app.url_map.add( Submount("/foo", [Rule("/bar", endpoint="bar"), Rule("/", endpoint="index")]) ) @app.endpoint("bar") def bar(): return "bar" @app.endpoint("index") def index(): return "index" > assert client.get("/foo/").data == b"index" tests/test_basic.py:227: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/foo/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning _________________________________ test_session _________________________________ app = , client = > def test_session(app, client): @app.route("/set", methods=["POST"]) def set(): assert not flask.session.accessed assert not flask.session.modified flask.session["value"] = flask.request.form["value"] assert flask.session.accessed assert flask.session.modified return "value set" @app.route("/get") def get(): assert not flask.session.accessed assert not flask.session.modified v = flask.session.get("value", "None") assert flask.session.accessed assert not flask.session.modified return v > assert client.post("/set", data={"value": "42"}).data == b"value set" tests/test_basic.py:250: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1248: in post return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/set', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ________________________ test_session_using_server_name ________________________ app = , client = > def test_session_using_server_name(app, client): app.config.update(SERVER_NAME="example.com") @app.route("/") def index(): flask.session["testing"] = 42 return "Hello World" rv = client.get("/", "http://example.com/") > assert "domain=.example.com" in rv.headers["set-cookie"].lower() E AssertionError: assert 'domain=.example.com' in 'session=eyj0zxn0aw5nijo0mn0.zqleaw._n_wvudhkm_c1qkog0rppgki_2w; domain=example.com; httponly; path=/' E + where 'session=eyj0zxn0aw5nijo0mn0.zqleaw._n_wvudhkm_c1qkog0rppgki_2w; domain=example.com; httponly; path=/' = () E + where = 'session=eyJ0ZXN0aW5nIjo0Mn0.ZQleaw._n_WVudhkm_C1QKoG0RPpGki_2w; Domain=example.com; HttpOnly; Path=/'.lower tests/test_basic.py:263: AssertionError ___________________ test_session_using_server_name_and_port ____________________ app = , client = > def test_session_using_server_name_and_port(app, client): app.config.update(SERVER_NAME="example.com:8080") @app.route("/") def index(): flask.session["testing"] = 42 return "Hello World" rv = client.get("/", "http://example.com:8080/") > assert "domain=.example.com" in rv.headers["set-cookie"].lower() E AssertionError: assert 'domain=.example.com' in 'session=eyj0zxn0aw5nijo0mn0.zqleaw._n_wvudhkm_c1qkog0rppgki_2w; domain=example.com; httponly; path=/' E + where 'session=eyj0zxn0aw5nijo0mn0.zqleaw._n_wvudhkm_c1qkog0rppgki_2w; domain=example.com; httponly; path=/' = () E + where = 'session=eyJ0ZXN0aW5nIjo0Mn0.ZQleaw._n_WVudhkm_C1QKoG0RPpGki_2w; Domain=example.com; HttpOnly; Path=/'.lower tests/test_basic.py:276: AssertionError _____________________ test_session_using_session_settings ______________________ app = , client = > def test_session_using_session_settings(app, client): app.config.update( SERVER_NAME="www.example.com:8080", APPLICATION_ROOT="/test", SESSION_COOKIE_DOMAIN=".example.com", SESSION_COOKIE_HTTPONLY=False, SESSION_COOKIE_SECURE=True, SESSION_COOKIE_SAMESITE="Lax", SESSION_COOKIE_PATH="/", ) @app.route("/") def index(): flask.session["testing"] = 42 return "Hello World" rv = client.get("/", "http://www.example.com:8080/test/") cookie = rv.headers["set-cookie"].lower() > assert "domain=.example.com" in cookie E AssertionError: assert 'domain=.example.com' in 'session=eyj0zxn0aw5nijo0mn0.zqleaw._n_wvudhkm_c1qkog0rppgki_2w; domain=example.com; secure; path=/; samesite=lax' tests/test_basic.py:334: AssertionError ____________________ test_session_using_samesite_attribute _____________________ app = , client = > def test_session_using_samesite_attribute(app, client): @app.route("/") def index(): flask.session["testing"] = 42 return "Hello World" app.config.update(SESSION_COOKIE_SAMESITE="invalid") with pytest.raises(ValueError): > client.get("/") tests/test_basic.py:363: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning _____________________________ test_missing_session _____________________________ app = def test_missing_session(app): app.secret_key = None def expect_exception(f, *args, **kwargs): e = pytest.raises(RuntimeError, f, *args, **kwargs) assert e.value.args and "session is unavailable" in e.value.args[0] > with app.test_request_context(): tests/test_basic.py:416: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/app.py:2036: in test_request_context builder = EnvironBuilder(self, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ___________________________ test_session_expiration ____________________________ app = , client = > def test_session_expiration(app, client): permanent = True @app.route("/") def index(): flask.session["test"] = 42 flask.session.permanent = permanent return "" @app.route("/test") def test(): return str(flask.session.permanent) > rv = client.get("/") tests/test_basic.py:435: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ___________________________ test_session_stored_last ___________________________ app = , client = > def test_session_stored_last(app, client): @app.after_request def modify_session(response): flask.session["foo"] = 42 return response @app.route("/") def dump_session_contents(): return repr(flask.session.get("foo")) > assert client.get("/").data == b"None" tests/test_basic.py:464: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning __________________________ test_session_special_types __________________________ app = , client = > def test_session_special_types(app, client): now = datetime.utcnow().replace(microsecond=0) the_uuid = uuid.uuid4() @app.route("/") def dump_session_contents(): flask.session["t"] = (1, 2, 3) flask.session["b"] = b"\xff" flask.session["m"] = flask.Markup("") flask.session["u"] = the_uuid flask.session["d"] = now flask.session["t_tag"] = {" t": "not-a-tuple"} flask.session["di_t_tag"] = {" t__": "not-a-tuple"} flask.session["di_tag"] = {" di": "not-a-dict"} return "", 204 with client: > client.get("/") tests/test_basic.py:485: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning _________________________ test_session_cookie_setting __________________________ app = def test_session_cookie_setting(app): is_permanent = True @app.route("/bump") def bump(): rv = flask.session["foo"] = flask.session.get("foo", 0) + 1 flask.session.permanent = is_permanent return str(rv) @app.route("/read") def read(): return str(flask.session.get("foo", 0)) def run_test(expect_header): with app.test_client() as c: assert c.get("/bump").data == b"1" assert c.get("/bump").data == b"2" assert c.get("/bump").data == b"3" rv = c.get("/read") set_cookie = rv.headers.get("set-cookie") assert (set_cookie is not None) == expect_header assert rv.data == b"3" is_permanent = True app.config["SESSION_REFRESH_EACH_REQUEST"] = True > run_test(expect_header=True) tests/test_basic.py:525: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_basic.py:514: in run_test assert c.get("/bump").data == b"1" /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/bump', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ___________________________ test_session_vary_cookie ___________________________ app = , client = > def test_session_vary_cookie(app, client): @app.route("/set") def set_session(): flask.session["test"] = "test" return "" @app.route("/get") def get(): return flask.session.get("test") @app.route("/getitem") def getitem(): return flask.session["test"] @app.route("/setdefault") def setdefault(): return flask.session.setdefault("test", "default") @app.route("/vary-cookie-header-set") def vary_cookie_header_set(): response = flask.Response() response.vary.add("Cookie") flask.session["test"] = "test" return response @app.route("/vary-header-set") def vary_header_set(): response = flask.Response() response.vary.update(("Accept-Encoding", "Accept-Language")) flask.session["test"] = "test" return response @app.route("/no-vary-header") def no_vary_header(): return "" def expect(path, header_value="Cookie"): rv = client.get(path) if header_value: # The 'Vary' key should exist in the headers only once. assert len(rv.headers.get_all("Vary")) == 1 assert rv.headers["Vary"] == header_value else: assert "Vary" not in rv.headers > expect("/set") tests/test_basic.py:586: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_basic.py:577: in expect rv = client.get(path) /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/set', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ____________________________ test_extended_flashing ____________________________ app = def test_extended_flashing(app): # Be sure app.testing=True below, else tests can fail silently. # # Specifically, if app.testing is not set to True, the AssertionErrors # in the view functions will cause a 500 response to the test client # instead of propagating exceptions. @app.route("/") def index(): flask.flash("Hello World") flask.flash("Hello World", "error") flask.flash(flask.Markup("Testing"), "warning") return "" @app.route("/test/") def test(): messages = flask.get_flashed_messages() assert list(messages) == [ "Hello World", "Hello World", flask.Markup("Testing"), ] return "" @app.route("/test_with_categories/") def test_with_categories(): messages = flask.get_flashed_messages(with_categories=True) assert len(messages) == 3 assert list(messages) == [ ("message", "Hello World"), ("error", "Hello World"), ("warning", flask.Markup("Testing")), ] return "" @app.route("/test_filter/") def test_filter(): messages = flask.get_flashed_messages( category_filter=["message"], with_categories=True ) assert list(messages) == [("message", "Hello World")] return "" @app.route("/test_filters/") def test_filters(): messages = flask.get_flashed_messages( category_filter=["message", "warning"], with_categories=True ) assert list(messages) == [ ("message", "Hello World"), ("warning", flask.Markup("Testing")), ] return "" @app.route("/test_filters_without_returning_categories/") def test_filters2(): messages = flask.get_flashed_messages(category_filter=["message", "warning"]) assert len(messages) == 2 assert messages[0] == "Hello World" assert messages[1] == flask.Markup("Testing") return "" # Create new test client on each test to clean flashed messages. client = app.test_client() > client.get("/") tests/test_basic.py:669: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ___________________________ test_request_processing ____________________________ app = , client = > def test_request_processing(app, client): evts = [] @app.before_request def before_request(): evts.append("before") @app.after_request def after_request(response): response.data += b"|after" evts.append("after") return response @app.route("/") def index(): assert "before" in evts assert "after" not in evts return "request" assert "after" not in evts > rv = client.get("/").data tests/test_basic.py:705: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ___________________ test_request_preprocessing_early_return ____________________ app = , client = > def test_request_preprocessing_early_return(app, client): evts = [] @app.before_request def before_request1(): evts.append(1) @app.before_request def before_request2(): evts.append(2) return "hello" @app.before_request def before_request3(): evts.append(3) return "bye" @app.route("/") def index(): evts.append("index") return "damnit" > rv = client.get("/").data.strip() tests/test_basic.py:732: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ________________________ test_after_request_processing _________________________ app = , client = > def test_after_request_processing(app, client): @app.route("/") def index(): @flask.after_this_request def foo(response): response.headers["X-Foo"] = "a header" return response return "Test" > resp = client.get("/") tests/test_basic.py:747: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ________________________ test_teardown_request_handler _________________________ app = , client = > def test_teardown_request_handler(app, client): called = [] @app.teardown_request def teardown_request(exc): called.append(True) return "Ignored" @app.route("/") def root(): return "Response" > rv = client.get("/") tests/test_basic.py:764: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ___________________ test_teardown_request_handler_debug_mode ___________________ app = , client = > def test_teardown_request_handler_debug_mode(app, client): called = [] @app.teardown_request def teardown_request(exc): called.append(True) return "Ignored" @app.route("/") def root(): return "Response" > rv = client.get("/") tests/test_basic.py:782: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning _____________________ test_teardown_request_handler_error ______________________ app = , client = > def test_teardown_request_handler_error(app, client): called = [] app.testing = False @app.teardown_request def teardown_request1(exc): assert type(exc) == ZeroDivisionError called.append(True) # This raises a new error and blows away sys.exc_info(), so we can # test that all teardown_requests get passed the same original # exception. try: raise TypeError() except Exception: pass @app.teardown_request def teardown_request2(exc): assert type(exc) == ZeroDivisionError called.append(True) # This raises a new error and blows away sys.exc_info(), so we can # test that all teardown_requests get passed the same original # exception. try: raise TypeError() except Exception: pass @app.route("/") def fails(): 1 // 0 > rv = client.get("/") tests/test_basic.py:820: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning _______________________ test_before_after_request_order ________________________ app = , client = > def test_before_after_request_order(app, client): called = [] @app.before_request def before1(): called.append(1) @app.before_request def before2(): called.append(2) @app.after_request def after1(response): called.append(4) return response @app.after_request def after2(response): called.append(3) return response @app.teardown_request def finish1(exc): called.append(6) @app.teardown_request def finish2(exc): called.append(5) @app.route("/") def index(): return "42" > rv = client.get("/") tests/test_basic.py:859: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning _____________________________ test_error_handling ______________________________ app = , client = > def test_error_handling(app, client): app.testing = False @app.errorhandler(404) def not_found(e): return "not found", 404 @app.errorhandler(500) def internal_server_error(e): return "internal server error", 500 @app.errorhandler(Forbidden) def forbidden(e): return "forbidden", 403 @app.route("/") def index(): flask.abort(404) @app.route("/error") def error(): 1 // 0 @app.route("/forbidden") def error2(): flask.abort(403) > rv = client.get("/") tests/test_basic.py:891: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ________________________ test_error_handling_processing ________________________ app = , client = > def test_error_handling_processing(app, client): app.testing = False @app.errorhandler(500) def internal_server_error(e): return "internal server error", 500 @app.route("/") def broken_func(): 1 // 0 @app.after_request def after_request(resp): resp.mimetype = "text/x-special" return resp > resp = client.get("/") tests/test_basic.py:925: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ______________________ test_baseexception_error_handling _______________________ app = , client = > def test_baseexception_error_handling(app, client): app.testing = False @app.route("/") def broken_func(): raise KeyboardInterrupt() with client: with pytest.raises(KeyboardInterrupt): > client.get("/") tests/test_basic.py:939: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ____________________ test_before_request_and_routing_errors ____________________ app = , client = > def test_before_request_and_routing_errors(app, client): @app.before_request def attach_something(): flask.g.something = "value" @app.errorhandler(404) def return_something(error): return flask.g.something, 404 > rv = client.get("/") tests/test_basic.py:955: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ___________________________ test_user_error_handling ___________________________ app = , client = > def test_user_error_handling(app, client): class MyException(Exception): pass @app.errorhandler(MyException) def handle_my_exception(e): assert isinstance(e, MyException) return "42" @app.route("/") def index(): raise MyException() > assert client.get("/").data == b"42" tests/test_basic.py:973: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ______________________ test_http_error_subclass_handling _______________________ app = , client = > def test_http_error_subclass_handling(app, client): class ForbiddenSubclass(Forbidden): pass @app.errorhandler(ForbiddenSubclass) def handle_forbidden_subclass(e): assert isinstance(e, ForbiddenSubclass) return "banana" @app.errorhandler(403) def handle_403(e): assert not isinstance(e, ForbiddenSubclass) assert isinstance(e, Forbidden) return "apple" @app.route("/1") def index1(): raise ForbiddenSubclass() @app.route("/2") def index2(): flask.abort(403) @app.route("/3") def index3(): raise Forbidden() > assert client.get("/1").data == b"banana" tests/test_basic.py:1003: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/1', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning _________________________ test_errorhandler_precedence _________________________ app = , client = > def test_errorhandler_precedence(app, client): class E1(Exception): pass class E2(Exception): pass class E3(E1, E2): pass @app.errorhandler(E2) def handle_e2(e): return "E2" @app.errorhandler(Exception) def handle_exception(e): return "Exception" @app.route("/E1") def raise_e1(): raise E1 @app.route("/E3") def raise_e3(): raise E3 > rv = client.get("/E1") tests/test_basic.py:1034: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/E1', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ___________________ test_trapping_of_bad_request_key_errors ____________________ app = , client = > def test_trapping_of_bad_request_key_errors(app, client): @app.route("/key") def fail(): flask.request.form["missing_key"] @app.route("/abort") def allow_abort(): flask.abort(400) > rv = client.get("/key") tests/test_basic.py:1050: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/key', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning _____________________ test_trapping_of_all_http_exceptions _____________________ app = , client = > def test_trapping_of_all_http_exceptions(app, client): app.config["TRAP_HTTP_EXCEPTIONS"] = True @app.route("/fail") def fail(): flask.abort(404) with pytest.raises(NotFound): > client.get("/fail") tests/test_basic.py:1080: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/fail', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ___________________ test_error_handler_after_processor_error ___________________ app = , client = > def test_error_handler_after_processor_error(app, client): app.testing = False @app.before_request def before_request(): if _trigger == "before": 1 // 0 @app.after_request def after_request(response): if _trigger == "after": 1 // 0 return response @app.route("/") def index(): return "Foo" @app.errorhandler(500) def internal_server_error(e): return "Hello Server Error", 500 for _trigger in "before", "after": > rv = client.get("/") tests/test_basic.py:1106: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning __________________________ test_enctype_debug_helper ___________________________ app = , client = > def test_enctype_debug_helper(app, client): from flask.debughelpers import DebugFilesKeyError app.debug = True @app.route("/fail", methods=["POST"]) def index(): return flask.request.files["foo"].filename # with statement is important because we leave an exception on the # stack otherwise and we want to ensure that this is not the case # to not negatively affect other tests. with client: with pytest.raises(DebugFilesKeyError) as e: > client.post("/fail", data={"foo": "index.txt"}) tests/test_basic.py:1125: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1248: in post return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/fail', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning _____________________________ test_response_types ______________________________ app = , client = > def test_response_types(app, client): @app.route("/text") def from_text(): return "Hällo Wörld" @app.route("/bytes") def from_bytes(): return "Hällo Wörld".encode() @app.route("/full_tuple") def from_full_tuple(): return ( "Meh", 400, {"X-Foo": "Testing", "Content-Type": "text/plain; charset=utf-8"}, ) @app.route("/text_headers") def from_text_headers(): return "Hello", {"X-Foo": "Test", "Content-Type": "text/plain; charset=utf-8"} @app.route("/text_status") def from_text_status(): return "Hi, status!", 400 @app.route("/response_headers") def from_response_headers(): return ( flask.Response( "Hello world", 404, {"Content-Type": "text/html", "X-Foo": "Baz"} ), {"Content-Type": "text/plain", "X-Foo": "Bar", "X-Bar": "Foo"}, ) @app.route("/response_status") def from_response_status(): return app.response_class("Hello world", 400), 500 @app.route("/wsgi") def from_wsgi(): return NotFound() @app.route("/dict") def from_dict(): return {"foo": "bar"}, 201 > assert client.get("/text").data == "Hällo Wörld".encode() tests/test_basic.py:1176: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/text', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning __________________________ test_response_type_errors ___________________________ def test_response_type_errors(): app = flask.Flask(__name__) app.testing = True @app.route("/none") def from_none(): pass @app.route("/small_tuple") def from_small_tuple(): return ("Hello",) @app.route("/large_tuple") def from_large_tuple(): return "Hello", 234, {"X-Foo": "Bar"}, "???" @app.route("/bad_type") def from_bad_type(): return True @app.route("/bad_wsgi") def from_bad_wsgi(): return lambda: None c = app.test_client() with pytest.raises(TypeError) as e: > c.get("/none") tests/test_basic.py:1243: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/none', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ___________________________ test_build_error_handler ___________________________ app = def test_build_error_handler(app): # Test base case, a URL which results in a BuildError. > with app.test_request_context(): tests/test_basic.py:1359: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/app.py:2036: in test_request_context builder = EnvironBuilder(self, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning _______________________ test_build_error_handler_reraise _______________________ app = def test_build_error_handler_reraise(app): # Test a custom handler which reraises the BuildError def handler_raises_build_error(error, endpoint, values): raise error app.url_build_error_handlers.append(handler_raises_build_error) > with app.test_request_context(): tests/test_basic.py:1390: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/app.py:2036: in test_request_context builder = EnvironBuilder(self, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning __________ test_url_for_passes_special_values_to_build_error_handler ___________ app = def test_url_for_passes_special_values_to_build_error_handler(app): @app.url_build_error_handlers.append def handler(error, endpoint, values): assert values == { "_external": False, "_anchor": None, "_method": None, "_scheme": None, } return "handled" > with app.test_request_context(): tests/test_basic.py:1405: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/app.py:2036: in test_request_context builder = EnvironBuilder(self, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ______________________________ test_static_files _______________________________ app = , client = > def test_static_files(app, client): > rv = client.get("/static/index.html") tests/test_basic.py:1410: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/static/index.html', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning _____________________________ test_static_url_path _____________________________ def test_static_url_path(): app = flask.Flask(__name__, static_url_path="/foo") app.testing = True > rv = app.test_client().get("/foo/index.html") tests/test_basic.py:1421: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/foo/index.html', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ____________________ test_static_url_path_with_ending_slash ____________________ def test_static_url_path_with_ending_slash(): app = flask.Flask(__name__, static_url_path="/foo/") app.testing = True > rv = app.test_client().get("/foo/index.html") tests/test_basic.py:1432: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/foo/index.html', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning __________________________ test_static_url_empty_path __________________________ app = def test_static_url_empty_path(app): app = flask.Flask(__name__, static_folder="", static_url_path="") > rv = app.test_client().open("/static/index.html", method="GET") tests/test_basic.py:1442: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/static/index.html', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ______________________ test_static_url_empty_path_default ______________________ app = def test_static_url_empty_path_default(app): app = flask.Flask(__name__, static_folder="") > rv = app.test_client().open("/static/index.html", method="GET") tests/test_basic.py:1449: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/static/index.html', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning _____________________ test_static_folder_with_pathlib_path _____________________ app = def test_static_folder_with_pathlib_path(app): from pathlib import Path app = flask.Flask(__name__, static_folder=Path("static")) > rv = app.test_client().open("/static/index.html", method="GET") tests/test_basic.py:1458: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/static/index.html', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning _____________________ test_static_folder_with_ending_slash _____________________ def test_static_folder_with_ending_slash(): app = flask.Flask(__name__, static_folder="static/") @app.route("/") def catch_all(path): return path > rv = app.test_client().get("/catch/all") tests/test_basic.py:1470: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/catch/all', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning _____________________ test_static_route_with_host_matching _____________________ def test_static_route_with_host_matching(): app = flask.Flask(__name__, host_matching=True, static_host="example.com") c = app.test_client() > rv = c.get("http://example.com/static/index.html") tests/test_basic.py:1477: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = 'http://example.com/static/index.html', scheme = None allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning __________________________ test_server_name_subdomain __________________________ def test_server_name_subdomain(): app = flask.Flask(__name__, subdomain_matching=True) client = app.test_client() @app.route("/") def index(): return "default" @app.route("/", subdomain="foo") def subdomain(): return "subdomain" app.config["SERVER_NAME"] = "dev.local:5000" > rv = client.get("/") tests/test_basic.py:1513: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ___________________________ test_max_content_length ____________________________ app = , client = > def test_max_content_length(app, client): app.config["MAX_CONTENT_LENGTH"] = 64 @app.before_request def always_first(): flask.request.form["myfile"] AssertionError() @app.route("/accept", methods=["POST"]) def accept_file(): flask.request.form["myfile"] AssertionError() @app.errorhandler(413) def catcher(error): return "42" > rv = client.post("/accept", data={"myfile": "foo" * 100}) tests/test_basic.py:1605: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1248: in post return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/accept', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning _____________________________ test_url_processors ______________________________ app = , client = > def test_url_processors(app, client): @app.url_defaults def add_language_code(endpoint, values): if flask.g.lang_code is not None and app.url_map.is_endpoint_expecting( endpoint, "lang_code" ): values.setdefault("lang_code", flask.g.lang_code) @app.url_value_preprocessor def pull_lang_code(endpoint, values): flask.g.lang_code = values.pop("lang_code", None) @app.route("//") def index(): return flask.url_for("about") @app.route("//about") def about(): return flask.url_for("something_else") @app.route("/foo") def something_else(): return flask.url_for("about", lang_code="en") > assert client.get("/de/").data == b"/de/about" tests/test_basic.py:1633: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/de/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ______________________ test_inject_blueprint_url_defaults ______________________ app = def test_inject_blueprint_url_defaults(app): bp = flask.Blueprint("foo", __name__, template_folder="template") @bp.url_defaults def bp_defaults(endpoint, values): values["page"] = "login" @bp.route("/") def view(page): pass app.register_blueprint(bp) values = dict() app.inject_url_defaults("foo.view", values) expected = dict(page="login") assert values == expected > with app.test_request_context("/somepage"): tests/test_basic.py:1656: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/app.py:2036: in test_request_context builder = EnvironBuilder(self, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/somepage', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ____________________________ test_nonascii_pathinfo ____________________________ app = , client = > def test_nonascii_pathinfo(app, client): @app.route("/киртест") def index(): return "Hello World!" > rv = client.get("/киртест") tests/test_basic.py:1667: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/киртест', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ________________ test_debug_mode_complains_after_first_request _________________ app = , client = > def test_debug_mode_complains_after_first_request(app, client): app.debug = True @app.route("/") def index(): return "Awesome" assert not app.got_first_request > assert client.get("/").data == b"Awesome" tests/test_basic.py:1679: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning _____________________ test_before_first_request_functions ______________________ app = , client = > def test_before_first_request_functions(app, client): got = [] @app.before_first_request def foo(): got.append(42) > client.get("/") tests/test_basic.py:1703: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ________________ test_before_first_request_functions_concurrent ________________ cls = func = . at 0x7fd924e444a0> when = 'call' reraise = (, ) @classmethod def from_call( cls, func: "Callable[[], TResult]", when: "Literal['collect', 'setup', 'call', 'teardown']", reraise: Optional[ Union[Type[BaseException], Tuple[Type[BaseException], ...]] ] = None, ) -> "CallInfo[TResult]": """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None start = timing.time() precise_start = timing.perf_counter() try: > result: Optional[TResult] = func() /usr/lib/python3.11/site-packages/_pytest/runner.py:341: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/_pytest/runner.py:262: in lambda: ihook(item=item, **kwds), when=when, reraise=reraise /usr/lib/python3.11/site-packages/pluggy/_hooks.py:265: in __call__ return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult) /usr/lib/python3.11/site-packages/pluggy/_manager.py:80: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) /usr/lib/python3.11/site-packages/_pytest/threadexception.py:83: in pytest_runtest_call yield from thread_exception_runtest_hook() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def thread_exception_runtest_hook() -> Generator[None, None, None]: with catch_threading_exception() as cm: yield if cm.args: thread_name = "" if cm.args.thread is None else cm.args.thread.name msg = f"Exception in thread {thread_name}\n\n" msg += "".join( traceback.format_exception( cm.args.exc_type, cm.args.exc_value, cm.args.exc_traceback, ) ) > warnings.warn(pytest.PytestUnhandledThreadExceptionWarning(msg)) E pytest.PytestUnhandledThreadExceptionWarning: Exception in thread Thread-5 (get_and_assert) E E Traceback (most recent call last): E File "/usr/lib64/python3.11/threading.py", line 1038, in _bootstrap_inner E self.run() E File "/usr/lib64/python3.11/threading.py", line 975, in run E self._target(*self._args, **self._kwargs) E File "/builddir/build/BUILD/Flask-2.1.3/tests/test_basic.py", line 1719, in get_and_assert E client.get("/") E File "/usr/lib/python3.11/site-packages/werkzeug/test.py", line 1243, in get E return self.open(*args, **kw) E ^^^^^^^^^^^^^^^^^^^^^^ E File "/builddir/build/BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py", line 215, in open E request = self._request_from_builder_args(args, kwargs) E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E File "/builddir/build/BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py", line 184, in _request_from_builder_args E builder = EnvironBuilder(self.application, *args, **kwargs) E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E File "/builddir/build/BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py", line 71, in __init__ E url = url_parse(path) E ^^^^^^^^^^^^^^^ E File "/usr/lib/python3.11/site-packages/werkzeug/urls.py", line 505, in url_parse E warnings.warn( E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/_pytest/threadexception.py:73: PytestUnhandledThreadExceptionWarning _______________________ test_routing_redirect_debugging ________________________ monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7fd9249a4f50> app = , client = > def test_routing_redirect_debugging(monkeypatch, app, client): @app.route("/foo/", methods=["GET", "POST"]) def foo(): return "success" app.debug = False > rv = client.post("/foo", data={}, follow_redirects=True) tests/test_basic.py:1735: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1248: in post return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/foo', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning _____________________ test_route_decorator_custom_endpoint _____________________ app = , client = > def test_route_decorator_custom_endpoint(app, client): app.debug = True @app.route("/foo/") def foo(): return flask.request.endpoint @app.route("/bar/", endpoint="bar") def for_bar(): return flask.request.endpoint @app.route("/bar/123", endpoint="123") def for_bar_foo(): return flask.request.endpoint > with app.test_request_context(): tests/test_basic.py:1769: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/app.py:2036: in test_request_context builder = EnvironBuilder(self, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ___________________________ test_preserve_only_once ____________________________ app = , client = > def test_preserve_only_once(app, client): app.debug = True @app.route("/fail") def fail_func(): 1 // 0 for _x in range(3): with pytest.raises(ZeroDivisionError): > client.get("/fail") tests/test_basic.py:1788: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/fail', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ______________________ test_preserve_remembers_exception _______________________ app = , client = > def test_preserve_remembers_exception(app, client): app.debug = True errors = [] @app.route("/fail") def fail_func(): 1 // 0 @app.route("/success") def success_func(): return "Okay" @app.teardown_request def teardown_handler(exc): errors.append(exc) # After this failure we did not yet call the teardown handler with pytest.raises(ZeroDivisionError): > client.get("/fail") tests/test_basic.py:1816: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/fail', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ____________________________ test_multi_route_rules ____________________________ app = , client = > def test_multi_route_rules(app, client): @app.route("/") @app.route("//") def index(test="a"): return test > rv = client.open("/") tests/test_basic.py:1922: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning _________________________ test_multi_route_class_views _________________________ app = , client = > def test_multi_route_class_views(app, client): class View: def __init__(self, app): app.add_url_rule("/", "index", self.index) app.add_url_rule("//", "index", self.index) def index(self, test="a"): return test _ = View(app) > rv = client.open("/") tests/test_basic.py:1938: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning _____________________________ test_max_cookie_size _____________________________ app = , client = > recwarn = WarningsRecorder(record=True) def test_max_cookie_size(app, client, recwarn): app.config["MAX_COOKIE_SIZE"] = 100 # outside app context, default to Werkzeug static value, # which is also the default config response = flask.Response() default = flask.Flask.default_config["MAX_COOKIE_SIZE"] assert response.max_cookie_size == default # inside app context, use app config with app.app_context(): assert flask.Response().max_cookie_size == 100 @app.route("/") def index(): r = flask.Response("", status=204) r.set_cookie("foo", "bar" * 100) return r client.get("/") > assert len(recwarn) == 1 E assert 3 == 1 E + where 3 = len(WarningsRecorder(record=True)) tests/test_basic.py:2013: AssertionError ____________________ test_blueprint_specific_error_handling ____________________ app = , client = > def test_blueprint_specific_error_handling(app, client): frontend = flask.Blueprint("frontend", __name__) backend = flask.Blueprint("backend", __name__) sideend = flask.Blueprint("sideend", __name__) @frontend.errorhandler(403) def frontend_forbidden(e): return "frontend says no", 403 @frontend.route("/frontend-no") def frontend_no(): flask.abort(403) @backend.errorhandler(403) def backend_forbidden(e): return "backend says no", 403 @backend.route("/backend-no") def backend_no(): flask.abort(403) @sideend.route("/what-is-a-sideend") def sideend_no(): flask.abort(403) app.register_blueprint(frontend) app.register_blueprint(backend) app.register_blueprint(sideend) @app.errorhandler(403) def app_forbidden(e): return "application itself says no", 403 > assert client.get("/frontend-no").data == b"frontend says no" tests/test_blueprints.py:41: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/frontend-no', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning _________________ test_blueprint_specific_user_error_handling __________________ app = , client = > def test_blueprint_specific_user_error_handling(app, client): class MyDecoratorException(Exception): pass class MyFunctionException(Exception): pass blue = flask.Blueprint("blue", __name__) @blue.errorhandler(MyDecoratorException) def my_decorator_exception_handler(e): assert isinstance(e, MyDecoratorException) return "boom" def my_function_exception_handler(e): assert isinstance(e, MyFunctionException) return "bam" blue.register_error_handler(MyFunctionException, my_function_exception_handler) @blue.route("/decorator") def blue_deco_test(): raise MyDecoratorException() @blue.route("/function") def blue_func_test(): raise MyFunctionException() app.register_blueprint(blue) > assert client.get("/decorator").data == b"boom" tests/test_blueprints.py:76: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/decorator', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ______________________ test_blueprint_app_error_handling _______________________ app = , client = > def test_blueprint_app_error_handling(app, client): errors = flask.Blueprint("errors", __name__) @errors.app_errorhandler(403) def forbidden_handler(e): return "you shall not pass", 403 @app.route("/forbidden") def app_forbidden(): flask.abort(403) forbidden_bp = flask.Blueprint("forbidden_bp", __name__) @forbidden_bp.route("/nope") def bp_forbidden(): flask.abort(403) app.register_blueprint(errors) app.register_blueprint(forbidden_bp) > assert client.get("/forbidden").data == b"you shall not pass" tests/test_blueprints.py:100: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/forbidden', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ______________________ test_blueprint_prefix_slash[-/-/] _______________________ app = , client = > prefix = '', rule = '/', url = '/' @pytest.mark.parametrize( ("prefix", "rule", "url"), ( ("", "/", "/"), ("/", "", "/"), ("/", "/", "/"), ("/foo", "", "/foo"), ("/foo/", "", "/foo/"), ("", "/bar", "/bar"), ("/foo/", "/bar", "/foo/bar"), ("/foo/", "bar", "/foo/bar"), ("/foo", "/bar", "/foo/bar"), ("/foo/", "//bar", "/foo/bar"), ("/foo//", "/bar", "/foo/bar"), ), ) def test_blueprint_prefix_slash(app, client, prefix, rule, url): bp = flask.Blueprint("test", __name__, url_prefix=prefix) @bp.route(rule) def index(): return "", 204 app.register_blueprint(bp) > assert client.get(url).status_code == 204 tests/test_blueprints.py:128: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ______________________ test_blueprint_prefix_slash[/--/] _______________________ app = , client = > prefix = '/', rule = '', url = '/' @pytest.mark.parametrize( ("prefix", "rule", "url"), ( ("", "/", "/"), ("/", "", "/"), ("/", "/", "/"), ("/foo", "", "/foo"), ("/foo/", "", "/foo/"), ("", "/bar", "/bar"), ("/foo/", "/bar", "/foo/bar"), ("/foo/", "bar", "/foo/bar"), ("/foo", "/bar", "/foo/bar"), ("/foo/", "//bar", "/foo/bar"), ("/foo//", "/bar", "/foo/bar"), ), ) def test_blueprint_prefix_slash(app, client, prefix, rule, url): bp = flask.Blueprint("test", __name__, url_prefix=prefix) @bp.route(rule) def index(): return "", 204 app.register_blueprint(bp) > assert client.get(url).status_code == 204 tests/test_blueprints.py:128: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ______________________ test_blueprint_prefix_slash[/-/-/] ______________________ app = , client = > prefix = '/', rule = '/', url = '/' @pytest.mark.parametrize( ("prefix", "rule", "url"), ( ("", "/", "/"), ("/", "", "/"), ("/", "/", "/"), ("/foo", "", "/foo"), ("/foo/", "", "/foo/"), ("", "/bar", "/bar"), ("/foo/", "/bar", "/foo/bar"), ("/foo/", "bar", "/foo/bar"), ("/foo", "/bar", "/foo/bar"), ("/foo/", "//bar", "/foo/bar"), ("/foo//", "/bar", "/foo/bar"), ), ) def test_blueprint_prefix_slash(app, client, prefix, rule, url): bp = flask.Blueprint("test", __name__, url_prefix=prefix) @bp.route(rule) def index(): return "", 204 app.register_blueprint(bp) > assert client.get(url).status_code == 204 tests/test_blueprints.py:128: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ___________________ test_blueprint_prefix_slash[/foo--/foo] ____________________ app = , client = > prefix = '/foo', rule = '', url = '/foo' @pytest.mark.parametrize( ("prefix", "rule", "url"), ( ("", "/", "/"), ("/", "", "/"), ("/", "/", "/"), ("/foo", "", "/foo"), ("/foo/", "", "/foo/"), ("", "/bar", "/bar"), ("/foo/", "/bar", "/foo/bar"), ("/foo/", "bar", "/foo/bar"), ("/foo", "/bar", "/foo/bar"), ("/foo/", "//bar", "/foo/bar"), ("/foo//", "/bar", "/foo/bar"), ), ) def test_blueprint_prefix_slash(app, client, prefix, rule, url): bp = flask.Blueprint("test", __name__, url_prefix=prefix) @bp.route(rule) def index(): return "", 204 app.register_blueprint(bp) > assert client.get(url).status_code == 204 tests/test_blueprints.py:128: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/foo', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning __________________ test_blueprint_prefix_slash[/foo/--/foo/] ___________________ app = , client = > prefix = '/foo/', rule = '', url = '/foo/' @pytest.mark.parametrize( ("prefix", "rule", "url"), ( ("", "/", "/"), ("/", "", "/"), ("/", "/", "/"), ("/foo", "", "/foo"), ("/foo/", "", "/foo/"), ("", "/bar", "/bar"), ("/foo/", "/bar", "/foo/bar"), ("/foo/", "bar", "/foo/bar"), ("/foo", "/bar", "/foo/bar"), ("/foo/", "//bar", "/foo/bar"), ("/foo//", "/bar", "/foo/bar"), ), ) def test_blueprint_prefix_slash(app, client, prefix, rule, url): bp = flask.Blueprint("test", __name__, url_prefix=prefix) @bp.route(rule) def index(): return "", 204 app.register_blueprint(bp) > assert client.get(url).status_code == 204 tests/test_blueprints.py:128: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/foo/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ___________________ test_blueprint_prefix_slash[-/bar-/bar] ____________________ app = , client = > prefix = '', rule = '/bar', url = '/bar' @pytest.mark.parametrize( ("prefix", "rule", "url"), ( ("", "/", "/"), ("/", "", "/"), ("/", "/", "/"), ("/foo", "", "/foo"), ("/foo/", "", "/foo/"), ("", "/bar", "/bar"), ("/foo/", "/bar", "/foo/bar"), ("/foo/", "bar", "/foo/bar"), ("/foo", "/bar", "/foo/bar"), ("/foo/", "//bar", "/foo/bar"), ("/foo//", "/bar", "/foo/bar"), ), ) def test_blueprint_prefix_slash(app, client, prefix, rule, url): bp = flask.Blueprint("test", __name__, url_prefix=prefix) @bp.route(rule) def index(): return "", 204 app.register_blueprint(bp) > assert client.get(url).status_code == 204 tests/test_blueprints.py:128: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/bar', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning _______________ test_blueprint_prefix_slash[/foo/-/bar-/foo/bar] _______________ app = , client = > prefix = '/foo/', rule = '/bar', url = '/foo/bar' @pytest.mark.parametrize( ("prefix", "rule", "url"), ( ("", "/", "/"), ("/", "", "/"), ("/", "/", "/"), ("/foo", "", "/foo"), ("/foo/", "", "/foo/"), ("", "/bar", "/bar"), ("/foo/", "/bar", "/foo/bar"), ("/foo/", "bar", "/foo/bar"), ("/foo", "/bar", "/foo/bar"), ("/foo/", "//bar", "/foo/bar"), ("/foo//", "/bar", "/foo/bar"), ), ) def test_blueprint_prefix_slash(app, client, prefix, rule, url): bp = flask.Blueprint("test", __name__, url_prefix=prefix) @bp.route(rule) def index(): return "", 204 app.register_blueprint(bp) > assert client.get(url).status_code == 204 tests/test_blueprints.py:128: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/foo/bar', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning _______________ test_blueprint_prefix_slash[/foo/-bar-/foo/bar] ________________ app = , client = > prefix = '/foo/', rule = 'bar', url = '/foo/bar' @pytest.mark.parametrize( ("prefix", "rule", "url"), ( ("", "/", "/"), ("/", "", "/"), ("/", "/", "/"), ("/foo", "", "/foo"), ("/foo/", "", "/foo/"), ("", "/bar", "/bar"), ("/foo/", "/bar", "/foo/bar"), ("/foo/", "bar", "/foo/bar"), ("/foo", "/bar", "/foo/bar"), ("/foo/", "//bar", "/foo/bar"), ("/foo//", "/bar", "/foo/bar"), ), ) def test_blueprint_prefix_slash(app, client, prefix, rule, url): bp = flask.Blueprint("test", __name__, url_prefix=prefix) @bp.route(rule) def index(): return "", 204 app.register_blueprint(bp) > assert client.get(url).status_code == 204 tests/test_blueprints.py:128: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/foo/bar', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning _______________ test_blueprint_prefix_slash[/foo-/bar-/foo/bar] ________________ app = , client = > prefix = '/foo', rule = '/bar', url = '/foo/bar' @pytest.mark.parametrize( ("prefix", "rule", "url"), ( ("", "/", "/"), ("/", "", "/"), ("/", "/", "/"), ("/foo", "", "/foo"), ("/foo/", "", "/foo/"), ("", "/bar", "/bar"), ("/foo/", "/bar", "/foo/bar"), ("/foo/", "bar", "/foo/bar"), ("/foo", "/bar", "/foo/bar"), ("/foo/", "//bar", "/foo/bar"), ("/foo//", "/bar", "/foo/bar"), ), ) def test_blueprint_prefix_slash(app, client, prefix, rule, url): bp = flask.Blueprint("test", __name__, url_prefix=prefix) @bp.route(rule) def index(): return "", 204 app.register_blueprint(bp) > assert client.get(url).status_code == 204 tests/test_blueprints.py:128: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/foo/bar', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ______________ test_blueprint_prefix_slash[/foo/-//bar-/foo/bar] _______________ app = , client = > prefix = '/foo/', rule = '//bar', url = '/foo/bar' @pytest.mark.parametrize( ("prefix", "rule", "url"), ( ("", "/", "/"), ("/", "", "/"), ("/", "/", "/"), ("/foo", "", "/foo"), ("/foo/", "", "/foo/"), ("", "/bar", "/bar"), ("/foo/", "/bar", "/foo/bar"), ("/foo/", "bar", "/foo/bar"), ("/foo", "/bar", "/foo/bar"), ("/foo/", "//bar", "/foo/bar"), ("/foo//", "/bar", "/foo/bar"), ), ) def test_blueprint_prefix_slash(app, client, prefix, rule, url): bp = flask.Blueprint("test", __name__, url_prefix=prefix) @bp.route(rule) def index(): return "", 204 app.register_blueprint(bp) > assert client.get(url).status_code == 204 tests/test_blueprints.py:128: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/foo/bar', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ______________ test_blueprint_prefix_slash[/foo//-/bar-/foo/bar] _______________ app = , client = > prefix = '/foo//', rule = '/bar', url = '/foo/bar' @pytest.mark.parametrize( ("prefix", "rule", "url"), ( ("", "/", "/"), ("/", "", "/"), ("/", "/", "/"), ("/foo", "", "/foo"), ("/foo/", "", "/foo/"), ("", "/bar", "/bar"), ("/foo/", "/bar", "/foo/bar"), ("/foo/", "bar", "/foo/bar"), ("/foo", "/bar", "/foo/bar"), ("/foo/", "//bar", "/foo/bar"), ("/foo//", "/bar", "/foo/bar"), ), ) def test_blueprint_prefix_slash(app, client, prefix, rule, url): bp = flask.Blueprint("test", __name__, url_prefix=prefix) @bp.route(rule) def index(): return "", 204 app.register_blueprint(bp) > assert client.get(url).status_code == 204 tests/test_blueprints.py:128: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/foo/bar', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning _________________________ test_blueprint_url_defaults __________________________ app = , client = > def test_blueprint_url_defaults(app, client): bp = flask.Blueprint("test", __name__) @bp.route("/foo", defaults={"baz": 42}) def foo(bar, baz): return f"{bar}/{baz:d}" @bp.route("/bar") def bar(bar): return str(bar) app.register_blueprint(bp, url_prefix="/1", url_defaults={"bar": 23}) app.register_blueprint(bp, name="test2", url_prefix="/2", url_defaults={"bar": 19}) > assert client.get("/1/foo").data == b"23/42" tests/test_blueprints.py:145: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/1/foo', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ________________________ test_blueprint_url_processors _________________________ app = , client = > def test_blueprint_url_processors(app, client): bp = flask.Blueprint("frontend", __name__, url_prefix="/") @bp.url_defaults def add_language_code(endpoint, values): values.setdefault("lang_code", flask.g.lang_code) @bp.url_value_preprocessor def pull_lang_code(endpoint, values): flask.g.lang_code = values.pop("lang_code") @bp.route("/") def index(): return flask.url_for(".about") @bp.route("/about") def about(): return flask.url_for(".index") app.register_blueprint(bp) > assert client.get("/de/").data == b"/de/about" tests/test_blueprints.py:172: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/de/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning __________________________ test_templates_and_static ___________________________ test_apps = None def test_templates_and_static(test_apps): from blueprintapp import app client = app.test_client() > rv = client.get("/") tests/test_blueprints.py:181: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning _________________________ test_default_static_max_age __________________________ app = def test_default_static_max_age(app): class MyBlueprint(flask.Blueprint): def get_send_file_max_age(self, filename): return 100 blueprint = MyBlueprint("blueprint", __name__, static_folder="static") app.register_blueprint(blueprint) # try/finally, in case other tests use this app for Blueprint tests. max_age_default = app.config["SEND_FILE_MAX_AGE_DEFAULT"] try: > with app.test_request_context(): tests/test_blueprints.py:234: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/app.py:2036: in test_request_context builder = EnvironBuilder(self, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning __________________________ test_dotted_names_from_app __________________________ app = , client = > def test_dotted_names_from_app(app, client): test = flask.Blueprint("test", __name__) @app.route("/") def app_index(): return flask.url_for("test.index") @test.route("/test/") def index(): return flask.url_for("app_index") app.register_blueprint(test) > rv = client.get("/") tests/test_blueprints.py:272: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ___________________________ test_empty_url_defaults ____________________________ app = , client = > def test_empty_url_defaults(app, client): bp = flask.Blueprint("bp", __name__) @bp.route("/", defaults={"page": 1}) @bp.route("/page/") def something(page): return str(page) app.register_blueprint(bp) > assert client.get("/").data == b"1" tests/test_blueprints.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning _____________________ test_route_decorator_custom_endpoint _____________________ app = , client = > def test_route_decorator_custom_endpoint(app, client): bp = flask.Blueprint("bp", __name__) @bp.route("/foo") def foo(): return flask.request.endpoint @bp.route("/bar", endpoint="bar") def foo_bar(): return flask.request.endpoint @bp.route("/bar/123", endpoint="123") def foo_bar_foo(): return flask.request.endpoint @bp.route("/bar/foo") def bar_foo(): return flask.request.endpoint app.register_blueprint(bp, url_prefix="/py") @app.route("/") def index(): return flask.request.endpoint > assert client.get("/").data == b"index" tests/test_blueprints.py:315: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ___________________________ test_endpoint_decorator ____________________________ app = , client = > def test_endpoint_decorator(app, client): from werkzeug.routing import Rule app.url_map.add(Rule("/foo", endpoint="bar")) bp = flask.Blueprint("bp", __name__) @bp.endpoint("bar") def foobar(): return flask.request.endpoint app.register_blueprint(bp, url_prefix="/bp_prefix") > assert client.get("/foo").data == b"bar" tests/test_blueprints.py:353: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/foo', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ______________________ test_template_filter_with_template ______________________ app = , client = > def test_template_filter_with_template(app, client): bp = flask.Blueprint("bp", __name__) @bp.app_template_filter() def super_reverse(s): return s[::-1] app.register_blueprint(bp, url_prefix="/py") @app.route("/") def index(): return flask.render_template("template_filter.html", value="abcd") > rv = client.get("/") tests/test_blueprints.py:422: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ________________ test_template_filter_after_route_with_template ________________ app = , client = > def test_template_filter_after_route_with_template(app, client): @app.route("/") def index(): return flask.render_template("template_filter.html", value="abcd") bp = flask.Blueprint("bp", __name__) @bp.app_template_filter() def super_reverse(s): return s[::-1] app.register_blueprint(bp, url_prefix="/py") > rv = client.get("/") tests/test_blueprints.py:438: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ____________________ test_add_template_filter_with_template ____________________ app = , client = > def test_add_template_filter_with_template(app, client): bp = flask.Blueprint("bp", __name__) def super_reverse(s): return s[::-1] bp.add_app_template_filter(super_reverse) app.register_blueprint(bp, url_prefix="/py") @app.route("/") def index(): return flask.render_template("template_filter.html", value="abcd") > rv = client.get("/") tests/test_blueprints.py:455: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning _________________ test_template_filter_with_name_and_template __________________ app = , client = > def test_template_filter_with_name_and_template(app, client): bp = flask.Blueprint("bp", __name__) @bp.app_template_filter("super_reverse") def my_reverse(s): return s[::-1] app.register_blueprint(bp, url_prefix="/py") @app.route("/") def index(): return flask.render_template("template_filter.html", value="abcd") > rv = client.get("/") tests/test_blueprints.py:472: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning _______________ test_add_template_filter_with_name_and_template ________________ app = , client = > def test_add_template_filter_with_name_and_template(app, client): bp = flask.Blueprint("bp", __name__) def my_reverse(s): return s[::-1] bp.add_app_template_filter(my_reverse, "super_reverse") app.register_blueprint(bp, url_prefix="/py") @app.route("/") def index(): return flask.render_template("template_filter.html", value="abcd") > rv = client.get("/") tests/test_blueprints.py:489: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning _______________________ test_template_test_with_template _______________________ app = , client = > def test_template_test_with_template(app, client): bp = flask.Blueprint("bp", __name__) @bp.app_template_test() def boolean(value): return isinstance(value, bool) app.register_blueprint(bp, url_prefix="/py") @app.route("/") def index(): return flask.render_template("template_test.html", value=False) > rv = client.get("/") tests/test_blueprints.py:558: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning _________________ test_template_test_after_route_with_template _________________ app = , client = > def test_template_test_after_route_with_template(app, client): @app.route("/") def index(): return flask.render_template("template_test.html", value=False) bp = flask.Blueprint("bp", __name__) @bp.app_template_test() def boolean(value): return isinstance(value, bool) app.register_blueprint(bp, url_prefix="/py") > rv = client.get("/") tests/test_blueprints.py:574: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning _____________________ test_add_template_test_with_template _____________________ app = , client = > def test_add_template_test_with_template(app, client): bp = flask.Blueprint("bp", __name__) def boolean(value): return isinstance(value, bool) bp.add_app_template_test(boolean) app.register_blueprint(bp, url_prefix="/py") @app.route("/") def index(): return flask.render_template("template_test.html", value=False) > rv = client.get("/") tests/test_blueprints.py:591: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning __________________ test_template_test_with_name_and_template ___________________ app = , client = > def test_template_test_with_name_and_template(app, client): bp = flask.Blueprint("bp", __name__) @bp.app_template_test("boolean") def is_boolean(value): return isinstance(value, bool) app.register_blueprint(bp, url_prefix="/py") @app.route("/") def index(): return flask.render_template("template_test.html", value=False) > rv = client.get("/") tests/test_blueprints.py:608: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ________________ test_add_template_test_with_name_and_template _________________ app = , client = > def test_add_template_test_with_name_and_template(app, client): bp = flask.Blueprint("bp", __name__) def is_boolean(value): return isinstance(value, bool) bp.add_app_template_test(is_boolean, "boolean") app.register_blueprint(bp, url_prefix="/py") @app.route("/") def index(): return flask.render_template("template_test.html", value=False) > rv = client.get("/") tests/test_blueprints.py:625: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ___________________________ test_context_processing ____________________________ app = , client = > def test_context_processing(app, client): answer_bp = flask.Blueprint("answer_bp", __name__) template_string = lambda: flask.render_template_string( # noqa: E731 "{% if notanswer %}{{ notanswer }} is not the answer. {% endif %}" "{% if answer %}{{ answer }} is the answer.{% endif %}" ) # App global context processor @answer_bp.app_context_processor def not_answer_context_processor(): return {"notanswer": 43} # Blueprint local context processor @answer_bp.context_processor def answer_context_processor(): return {"answer": 42} # Setup endpoints for testing @answer_bp.route("/bp") def bp_page(): return template_string() @app.route("/") def app_page(): return template_string() # Register the blueprint app.register_blueprint(answer_bp) > app_page_bytes = client.get("/").data tests/test_blueprints.py:659: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ___________________________ test_request_processing ____________________________ app = , client = > def test_request_processing(app, client): bp = flask.Blueprint("bp", __name__) evts = [] @bp.before_request def before_bp(): evts.append("before") @bp.after_request def after_bp(response): response.data += b"|after" evts.append("after") return response @bp.teardown_request def teardown_bp(exc): evts.append("teardown") # Setup routes for testing @bp.route("/bp") def bp_endpoint(): return "request" app.register_blueprint(bp) assert evts == [] > rv = client.get("/bp") tests/test_blueprints.py:716: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/bp', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning _________________________ test_app_request_processing __________________________ app = , client = > def test_app_request_processing(app, client): bp = flask.Blueprint("bp", __name__) evts = [] @bp.before_app_first_request def before_first_request(): evts.append("first") @bp.before_app_request def before_app(): evts.append("before") @bp.after_app_request def after_app(response): response.data += b"|after" evts.append("after") return response @bp.teardown_app_request def teardown_app(exc): evts.append("teardown") app.register_blueprint(bp) # Setup routes for testing @app.route("/") def bp_endpoint(): return "request" # before first request assert evts == [] # first request > resp = client.get("/").data tests/test_blueprints.py:754: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ___________________________ test_app_url_processors ____________________________ app = , client = > def test_app_url_processors(app, client): bp = flask.Blueprint("bp", __name__) # Register app-wide url defaults and preprocessor on blueprint @bp.app_url_defaults def add_language_code(endpoint, values): values.setdefault("lang_code", flask.g.lang_code) @bp.app_url_value_preprocessor def pull_lang_code(endpoint, values): flask.g.lang_code = values.pop("lang_code") # Register route rules at the app level @app.route("//") def index(): return flask.url_for("about") @app.route("//about") def about(): return flask.url_for("index") app.register_blueprint(bp) > assert client.get("/de/").data == b"/de/about" tests/test_blueprints.py:787: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/de/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ____________________________ test_nested_blueprint _____________________________ app = , client = > def test_nested_blueprint(app, client): parent = flask.Blueprint("parent", __name__) child = flask.Blueprint("child", __name__) grandchild = flask.Blueprint("grandchild", __name__) @parent.errorhandler(403) def forbidden(e): return "Parent no", 403 @parent.route("/") def parent_index(): return "Parent yes" @parent.route("/no") def parent_no(): flask.abort(403) @child.route("/") def child_index(): return "Child yes" @child.route("/no") def child_no(): flask.abort(403) @grandchild.errorhandler(403) def grandchild_forbidden(e): return "Grandchild no", 403 @grandchild.route("/") def grandchild_index(): return "Grandchild yes" @grandchild.route("/no") def grandchild_no(): flask.abort(403) child.register_blueprint(grandchild, url_prefix="/grandchild") parent.register_blueprint(child, url_prefix="/child") app.register_blueprint(parent, url_prefix="/parent") > assert client.get("/parent/").data == b"Parent yes" tests/test_blueprints.py:832: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/parent/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning __________________________ test_nested_callback_order __________________________ app = , client = > def test_nested_callback_order(app, client): parent = flask.Blueprint("parent", __name__) child = flask.Blueprint("child", __name__) @app.before_request def app_before1(): flask.g.setdefault("seen", []).append("app_1") @app.teardown_request def app_teardown1(e=None): assert flask.g.seen.pop() == "app_1" @app.before_request def app_before2(): flask.g.setdefault("seen", []).append("app_2") @app.teardown_request def app_teardown2(e=None): assert flask.g.seen.pop() == "app_2" @app.context_processor def app_ctx(): return dict(key="app") @parent.before_request def parent_before1(): flask.g.setdefault("seen", []).append("parent_1") @parent.teardown_request def parent_teardown1(e=None): assert flask.g.seen.pop() == "parent_1" @parent.before_request def parent_before2(): flask.g.setdefault("seen", []).append("parent_2") @parent.teardown_request def parent_teardown2(e=None): assert flask.g.seen.pop() == "parent_2" @parent.context_processor def parent_ctx(): return dict(key="parent") @child.before_request def child_before1(): flask.g.setdefault("seen", []).append("child_1") @child.teardown_request def child_teardown1(e=None): assert flask.g.seen.pop() == "child_1" @child.before_request def child_before2(): flask.g.setdefault("seen", []).append("child_2") @child.teardown_request def child_teardown2(e=None): assert flask.g.seen.pop() == "child_2" @child.context_processor def child_ctx(): return dict(key="child") @child.route("/a") def a(): return ", ".join(flask.g.seen) @child.route("/b") def b(): return flask.render_template_string("{{ key }}") parent.register_blueprint(child) app.register_blueprint(parent) > assert ( client.get("/a").data == b"app_1, app_2, parent_1, parent_2, child_1, child_2" ) tests/test_blueprints.py:914: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/a', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning _____________ test_nesting_url_prefixes[/parent-/child-None-None] ______________ parent_init = '/parent', child_init = '/child', parent_registration = None child_registration = None, app = client = > @pytest.mark.parametrize( "parent_init, child_init, parent_registration, child_registration", [ ("/parent", "/child", None, None), ("/parent", None, None, "/child"), (None, None, "/parent", "/child"), ("/other", "/something", "/parent", "/child"), ], ) def test_nesting_url_prefixes( parent_init, child_init, parent_registration, child_registration, app, client, ) -> None: parent = flask.Blueprint("parent", __name__, url_prefix=parent_init) child = flask.Blueprint("child", __name__, url_prefix=child_init) @child.route("/") def index(): return "index" parent.register_blueprint(child, url_prefix=child_registration) app.register_blueprint(parent, url_prefix=parent_registration) > response = client.get("/parent/child/") tests/test_blueprints.py:947: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/parent/child/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning _____________ test_nesting_url_prefixes[/parent-None-None-/child] ______________ parent_init = '/parent', child_init = None, parent_registration = None child_registration = '/child', app = client = > @pytest.mark.parametrize( "parent_init, child_init, parent_registration, child_registration", [ ("/parent", "/child", None, None), ("/parent", None, None, "/child"), (None, None, "/parent", "/child"), ("/other", "/something", "/parent", "/child"), ], ) def test_nesting_url_prefixes( parent_init, child_init, parent_registration, child_registration, app, client, ) -> None: parent = flask.Blueprint("parent", __name__, url_prefix=parent_init) child = flask.Blueprint("child", __name__, url_prefix=child_init) @child.route("/") def index(): return "index" parent.register_blueprint(child, url_prefix=child_registration) app.register_blueprint(parent, url_prefix=parent_registration) > response = client.get("/parent/child/") tests/test_blueprints.py:947: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/parent/child/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning _____________ test_nesting_url_prefixes[None-None-/parent-/child] ______________ parent_init = None, child_init = None, parent_registration = '/parent' child_registration = '/child', app = client = > @pytest.mark.parametrize( "parent_init, child_init, parent_registration, child_registration", [ ("/parent", "/child", None, None), ("/parent", None, None, "/child"), (None, None, "/parent", "/child"), ("/other", "/something", "/parent", "/child"), ], ) def test_nesting_url_prefixes( parent_init, child_init, parent_registration, child_registration, app, client, ) -> None: parent = flask.Blueprint("parent", __name__, url_prefix=parent_init) child = flask.Blueprint("child", __name__, url_prefix=child_init) @child.route("/") def index(): return "index" parent.register_blueprint(child, url_prefix=child_registration) app.register_blueprint(parent, url_prefix=parent_registration) > response = client.get("/parent/child/") tests/test_blueprints.py:947: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/parent/child/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning _________ test_nesting_url_prefixes[/other-/something-/parent-/child] __________ parent_init = '/other', child_init = '/something' parent_registration = '/parent', child_registration = '/child' app = , client = > @pytest.mark.parametrize( "parent_init, child_init, parent_registration, child_registration", [ ("/parent", "/child", None, None), ("/parent", None, None, "/child"), (None, None, "/parent", "/child"), ("/other", "/something", "/parent", "/child"), ], ) def test_nesting_url_prefixes( parent_init, child_init, parent_registration, child_registration, app, client, ) -> None: parent = flask.Blueprint("parent", __name__, url_prefix=parent_init) child = flask.Blueprint("child", __name__, url_prefix=child_init) @child.route("/") def index(): return "index" parent.register_blueprint(child, url_prefix=child_registration) app.register_blueprint(parent, url_prefix=parent_registration) > response = client.get("/parent/child/") tests/test_blueprints.py:947: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/parent/child/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ___________________________ test_blueprint_renaming ____________________________ app = , client = > def test_blueprint_renaming(app, client) -> None: bp = flask.Blueprint("bp", __name__) bp2 = flask.Blueprint("bp2", __name__) @bp.get("/") def index(): return flask.request.endpoint @bp.get("/error") def error(): flask.abort(403) @bp.errorhandler(403) def forbidden(_: Exception): return "Error", 403 @bp2.get("/") def index2(): return flask.request.endpoint bp.register_blueprint(bp2, url_prefix="/a", name="sub") app.register_blueprint(bp, url_prefix="/a") app.register_blueprint(bp, url_prefix="/b", name="alt") > assert client.get("/a/").data == b"bp.index" tests/test_blueprints.py:998: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/a/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ____________________________ test_custom_converters ____________________________ app = , client = > def test_custom_converters(app, client): class ListConverter(BaseConverter): def to_python(self, value): return value.split(",") def to_url(self, value): base_to_url = super().to_url return ",".join(base_to_url(x) for x in value) app.url_map.converters["list"] = ListConverter @app.route("/") def index(args): return "|".join(args) > assert client.get("/1,2,3").data == b"1|2|3" tests/test_converters.py:23: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/1,2,3', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ____________________________ test_context_available ____________________________ app = , client = > def test_context_available(app, client): class ContextConverter(BaseConverter): def to_python(self, value): assert request is not None assert session is not None return value app.url_map.converters["ctx"] = ContextConverter @app.get("/") def index(name): return name > assert client.get("/admin").data == b"admin" tests/test_converters.py:42: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/admin', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning __________________ TestStreaming.test_streaming_with_context ___________________ self = app = , client = > def test_streaming_with_context(self, app, client): @app.route("/") def index(): def generate(): yield "Hello " yield flask.request.args["name"] yield "!" return flask.Response(flask.stream_with_context(generate())) > rv = client.get("/?name=World") tests/test_helpers.py:191: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/?name=World', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ____________ TestStreaming.test_streaming_with_context_as_decorator ____________ self = app = , client = > def test_streaming_with_context_as_decorator(self, app, client): @app.route("/") def index(): @flask.stream_with_context def generate(hello): yield hello yield flask.request.args["name"] yield "!" return flask.Response(generate("Hello ")) > rv = client.get("/?name=World") tests/test_helpers.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/?name=World', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning __________ TestStreaming.test_streaming_with_context_and_custom_close __________ self = app = , client = > def test_streaming_with_context_and_custom_close(self, app, client): called = [] class Wrapper: def __init__(self, gen): self._gen = gen def __iter__(self): return self def close(self): called.append(42) def __next__(self): return next(self._gen) next = __next__ @app.route("/") def index(): def generate(): yield "Hello " yield flask.request.args["name"] yield "!" return flask.Response(flask.stream_with_context(Wrapper(generate()))) > rv = client.get("/?name=World") tests/test_helpers.py:235: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/?name=World', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ___________________ TestStreaming.test_stream_keeps_session ____________________ self = app = , client = > def test_stream_keeps_session(self, app, client): @app.route("/") def index(): flask.session["test"] = "flask" @flask.stream_with_context def gen(): yield flask.session["test"] return flask.Response(gen()) > rv = client.get("/") tests/test_helpers.py:250: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ________________________ TestHelpers.test_make_response ________________________ self = def test_make_response(self): app = flask.Flask(__name__) > with app.test_request_context(): tests/test_helpers.py:291: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/app.py:2036: in test_request_context builder = EnvironBuilder(self, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning _____________________ test_bad_request_debug_message[True] _____________________ app = , client = > debug = True @pytest.mark.parametrize("debug", (True, False)) def test_bad_request_debug_message(app, client, debug): app.config["DEBUG"] = debug app.config["TRAP_BAD_REQUEST_ERRORS"] = False @app.route("/json", methods=["POST"]) def post_json(): flask.request.get_json() return None > rv = client.post("/json", data=None, content_type="application/json") tests/test_json.py:23: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1248: in post return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/json', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ____________________ test_bad_request_debug_message[False] _____________________ app = , client = > debug = False @pytest.mark.parametrize("debug", (True, False)) def test_bad_request_debug_message(app, client, debug): app.config["DEBUG"] = debug app.config["TRAP_BAD_REQUEST_ERRORS"] = False @app.route("/json", methods=["POST"]) def post_json(): flask.request.get_json() return None > rv = client.post("/json", data=None, content_type="application/json") tests/test_json.py:23: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1248: in post return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/json', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ____________________________ test_json_bad_requests ____________________________ app = , client = > def test_json_bad_requests(app, client): @app.route("/json", methods=["POST"]) def return_json(): return flask.jsonify(foo=str(flask.request.get_json())) > rv = client.post("/json", data="malformed", content_type="application/json") tests/test_json.py:34: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1248: in post return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/json', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning __________________________ test_json_custom_mimetypes __________________________ app = , client = > def test_json_custom_mimetypes(app, client): @app.route("/json", methods=["POST"]) def return_json(): return flask.request.get_json() > rv = client.post("/json", data='"foo"', content_type="application/x+json") tests/test_json.py:43: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1248: in post return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/json', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning _________________________ test_jsonify_basic_types[0] __________________________ test_value = 0, app = client = > @pytest.mark.parametrize( "test_value", [0, -1, 1, 23, 3.14, "s", "longer string", True, False, None] ) def test_jsonify_basic_types(test_value, app, client): url = "/jsonify_basic_types" app.add_url_rule(url, url, lambda x=test_value: flask.jsonify(x)) > rv = client.get(url) tests/test_json.py:73: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/jsonify_basic_types', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning _________________________ test_jsonify_basic_types[-1] _________________________ test_value = -1, app = client = > @pytest.mark.parametrize( "test_value", [0, -1, 1, 23, 3.14, "s", "longer string", True, False, None] ) def test_jsonify_basic_types(test_value, app, client): url = "/jsonify_basic_types" app.add_url_rule(url, url, lambda x=test_value: flask.jsonify(x)) > rv = client.get(url) tests/test_json.py:73: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/jsonify_basic_types', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning _________________________ test_jsonify_basic_types[1] __________________________ test_value = 1, app = client = > @pytest.mark.parametrize( "test_value", [0, -1, 1, 23, 3.14, "s", "longer string", True, False, None] ) def test_jsonify_basic_types(test_value, app, client): url = "/jsonify_basic_types" app.add_url_rule(url, url, lambda x=test_value: flask.jsonify(x)) > rv = client.get(url) tests/test_json.py:73: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/jsonify_basic_types', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning _________________________ test_jsonify_basic_types[23] _________________________ test_value = 23, app = client = > @pytest.mark.parametrize( "test_value", [0, -1, 1, 23, 3.14, "s", "longer string", True, False, None] ) def test_jsonify_basic_types(test_value, app, client): url = "/jsonify_basic_types" app.add_url_rule(url, url, lambda x=test_value: flask.jsonify(x)) > rv = client.get(url) tests/test_json.py:73: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/jsonify_basic_types', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ________________________ test_jsonify_basic_types[3.14] ________________________ test_value = 3.14, app = client = > @pytest.mark.parametrize( "test_value", [0, -1, 1, 23, 3.14, "s", "longer string", True, False, None] ) def test_jsonify_basic_types(test_value, app, client): url = "/jsonify_basic_types" app.add_url_rule(url, url, lambda x=test_value: flask.jsonify(x)) > rv = client.get(url) tests/test_json.py:73: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/jsonify_basic_types', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning _________________________ test_jsonify_basic_types[s] __________________________ test_value = 's', app = client = > @pytest.mark.parametrize( "test_value", [0, -1, 1, 23, 3.14, "s", "longer string", True, False, None] ) def test_jsonify_basic_types(test_value, app, client): url = "/jsonify_basic_types" app.add_url_rule(url, url, lambda x=test_value: flask.jsonify(x)) > rv = client.get(url) tests/test_json.py:73: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/jsonify_basic_types', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ___________________ test_jsonify_basic_types[longer string] ____________________ test_value = 'longer string', app = client = > @pytest.mark.parametrize( "test_value", [0, -1, 1, 23, 3.14, "s", "longer string", True, False, None] ) def test_jsonify_basic_types(test_value, app, client): url = "/jsonify_basic_types" app.add_url_rule(url, url, lambda x=test_value: flask.jsonify(x)) > rv = client.get(url) tests/test_json.py:73: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/jsonify_basic_types', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ________________________ test_jsonify_basic_types[True] ________________________ test_value = True, app = client = > @pytest.mark.parametrize( "test_value", [0, -1, 1, 23, 3.14, "s", "longer string", True, False, None] ) def test_jsonify_basic_types(test_value, app, client): url = "/jsonify_basic_types" app.add_url_rule(url, url, lambda x=test_value: flask.jsonify(x)) > rv = client.get(url) tests/test_json.py:73: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/jsonify_basic_types', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning _______________________ test_jsonify_basic_types[False] ________________________ test_value = False, app = client = > @pytest.mark.parametrize( "test_value", [0, -1, 1, 23, 3.14, "s", "longer string", True, False, None] ) def test_jsonify_basic_types(test_value, app, client): url = "/jsonify_basic_types" app.add_url_rule(url, url, lambda x=test_value: flask.jsonify(x)) > rv = client.get(url) tests/test_json.py:73: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/jsonify_basic_types', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ________________________ test_jsonify_basic_types[None] ________________________ test_value = None, app = client = > @pytest.mark.parametrize( "test_value", [0, -1, 1, 23, 3.14, "s", "longer string", True, False, None] ) def test_jsonify_basic_types(test_value, app, client): url = "/jsonify_basic_types" app.add_url_rule(url, url, lambda x=test_value: flask.jsonify(x)) > rv = client.get(url) tests/test_json.py:73: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/jsonify_basic_types', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ______________________________ test_jsonify_dicts ______________________________ app = , client = > def test_jsonify_dicts(app, client): d = { "a": 0, "b": 23, "c": 3.14, "d": "t", "e": "Hi", "f": True, "g": False, "h": ["test list", 10, False], "i": {"test": "dict"}, } @app.route("/kw") def return_kwargs(): return flask.jsonify(**d) @app.route("/dict") def return_dict(): return flask.jsonify(d) for url in "/kw", "/dict": > rv = client.get(url) tests/test_json.py:100: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/kw', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning _____________________________ test_jsonify_arrays ______________________________ app = , client = > def test_jsonify_arrays(app, client): """Test jsonify of lists and args unpacking.""" a_list = [ 0, 42, 3.14, "t", "hello", True, False, ["test list", 2, False], {"test": "dict"}, ] @app.route("/args_unpack") def return_args_unpack(): return flask.jsonify(*a_list) @app.route("/array") def return_array(): return flask.jsonify(a_list) for url in "/args_unpack", "/array": > rv = client.get(url) tests/test_json.py:128: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/args_unpack', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ________________________ test_jsonify_datetime[value0] _________________________ app = , client = > value = datetime.datetime(1973, 3, 11, 6, 30, 45) @pytest.mark.parametrize( "value", [datetime.datetime(1973, 3, 11, 6, 30, 45), datetime.date(1975, 1, 5)] ) def test_jsonify_datetime(app, client, value): @app.route("/") def index(): return flask.jsonify(value=value) > r = client.get() tests/test_json.py:141: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ________________________ test_jsonify_datetime[value1] _________________________ app = , client = > value = datetime.date(1975, 1, 5) @pytest.mark.parametrize( "value", [datetime.datetime(1973, 3, 11, 6, 30, 45), datetime.date(1975, 1, 5)] ) def test_jsonify_datetime(app, client, value): @app.route("/") def index(): return flask.jsonify(value=value) > r = client.get() tests/test_json.py:141: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ___________________________ test_jsonify_uuid_types ____________________________ app = , client = > def test_jsonify_uuid_types(app, client): """Test jsonify with uuid.UUID types""" test_uuid = uuid.UUID(bytes=b"\xDE\xAD\xBE\xEF" * 4) url = "/uuid_test" app.add_url_rule(url, url, lambda: flask.jsonify(x=test_uuid)) > rv = client.get(url) tests/test_json.py:183: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/uuid_test', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ________________________________ test_json_attr ________________________________ app = , client = > def test_json_attr(app, client): @app.route("/add", methods=["POST"]) def add(): json = flask.request.get_json() return str(json["a"] + json["b"]) > rv = client.post( "/add", data=flask.json.dumps({"a": 1, "b": 2}), content_type="application/json", ) tests/test_json.py:202: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1248: in post return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/add', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ___________________________ test_json_customization ____________________________ app = , client = > def test_json_customization(app, client): class X: # noqa: B903, for Python2 compatibility def __init__(self, val): self.val = val class MyEncoder(flask.json.JSONEncoder): def default(self, o): if isinstance(o, X): return f"<{o.val}>" return flask.json.JSONEncoder.default(self, o) class MyDecoder(flask.json.JSONDecoder): def __init__(self, *args, **kwargs): kwargs.setdefault("object_hook", self.object_hook) flask.json.JSONDecoder.__init__(self, *args, **kwargs) def object_hook(self, obj): if len(obj) == 1 and "_foo" in obj: return X(obj["_foo"]) return obj app.json_encoder = MyEncoder app.json_decoder = MyDecoder @app.route("/", methods=["POST"]) def index(): return flask.json.dumps(flask.request.get_json()["x"]) > rv = client.post( "/", data=flask.json.dumps({"x": {"_foo": 42}}), content_type="application/json", ) tests/test_json.py:251: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1248: in post return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ______________________ test_blueprint_json_customization _______________________ app = , client = > def test_blueprint_json_customization(app, client): class X: __slots__ = ("val",) def __init__(self, val): self.val = val class MyEncoder(flask.json.JSONEncoder): def default(self, o): if isinstance(o, X): return f"<{o.val}>" return flask.json.JSONEncoder.default(self, o) class MyDecoder(flask.json.JSONDecoder): def __init__(self, *args, **kwargs): kwargs.setdefault("object_hook", self.object_hook) flask.json.JSONDecoder.__init__(self, *args, **kwargs) def object_hook(self, obj): if len(obj) == 1 and "_foo" in obj: return X(obj["_foo"]) return obj bp = flask.Blueprint("bp", __name__) bp.json_encoder = MyEncoder bp.json_decoder = MyDecoder @bp.route("/bp", methods=["POST"]) def index(): return flask.json.dumps(flask.request.get_json()["x"]) app.register_blueprint(bp) > rv = client.post( "/bp", data=flask.json.dumps({"x": {"_foo": 42}}), content_type="application/json", ) tests/test_json.py:294: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1248: in post return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/bp', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning __________________________ test_modified_url_encoding __________________________ app = , client = > @pytest.mark.skipif( not _has_encoding("euc-kr"), reason="The euc-kr encoding is required." ) def test_modified_url_encoding(app, client): class ModifiedRequest(flask.Request): url_charset = "euc-kr" app.request_class = ModifiedRequest app.url_map.charset = "euc-kr" @app.route("/") def index(): return flask.request.args["foo"] > rv = client.get("/", query_string={"foo": "정상처리"}, charset="euc-kr") tests/test_json.py:326: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ____________________________ test_json_key_sorting _____________________________ app = , client = > def test_json_key_sorting(app, client): app.debug = True assert app.config["JSON_SORT_KEYS"] d = dict.fromkeys(range(20), "foo") @app.route("/") def index(): return flask.jsonify(values=d) > rv = client.get("/") tests/test_json.py:341: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ___________________________ test_wsgi_errors_stream ____________________________ app = , client = > def test_wsgi_errors_stream(app, client): @app.route("/") def index(): app.logger.error("test") return "" stream = StringIO() > client.get("/", errors_stream=stream) tests/test_logging.py:61: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ___________________________ test_log_view_exception ____________________________ app = , client = > def test_log_view_exception(app, client): @app.route("/") def index(): raise Exception("test") app.testing = False stream = StringIO() > rv = client.get("/", errors_stream=stream) tests/test_logging.py:93: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ________________________________ test_aborting _________________________________ app = def test_aborting(app): class Foo(Exception): whatever = 42 @app.errorhandler(Foo) def handle_foo(e): return str(e.whatever) @app.route("/") def index(): raise flask.abort(flask.redirect(flask.url_for("test"))) @app.route("/test") def test(): raise Foo() with app.test_client() as c: > rv = c.get("/") tests/test_regression.py:21: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning _____________________________ test_teardown_on_pop _____________________________ app = def test_teardown_on_pop(app): buffer = [] @app.teardown_request def end_of_request(exception): buffer.append(exception) > ctx = app.test_request_context() tests/test_reqctx.py:22: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/app.py:2036: in test_request_context builder = EnvironBuilder(self, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ____________________ test_teardown_with_previous_exception _____________________ app = def test_teardown_with_previous_exception(app): buffer = [] @app.teardown_request def end_of_request(exception): buffer.append(exception) try: raise Exception("dummy") except Exception: pass > with app.test_request_context(): tests/test_reqctx.py:41: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/app.py:2036: in test_request_context builder = EnvironBuilder(self, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning _____________________ test_teardown_with_handled_exception _____________________ app = def test_teardown_with_handled_exception(app): buffer = [] @app.teardown_request def end_of_request(exception): buffer.append(exception) > with app.test_request_context(): tests/test_reqctx.py:53: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/app.py:2036: in test_request_context builder = EnvironBuilder(self, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning _______________________ test_proper_test_request_context _______________________ app = def test_proper_test_request_context(app): app.config.update(SERVER_NAME="localhost.localdomain:5000") @app.route("/") def index(): return None @app.route("/", subdomain="foo") def sub(): return None > with app.test_request_context("/"): tests/test_reqctx.py:73: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/app.py:2036: in test_request_context builder = EnvironBuilder(self, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning _____________________________ test_context_binding _____________________________ app = def test_context_binding(app): @app.route("/") def index(): return f"Hello {flask.request.args['name']}!" @app.route("/meh") def meh(): return flask.request.url > with app.test_request_context("/?name=World"): tests/test_reqctx.py:115: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/app.py:2036: in test_request_context builder = EnvironBuilder(self, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/?name=World', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ______________________________ test_context_test _______________________________ app = def test_context_test(app): assert not flask.request assert not flask.has_request_context() > ctx = app.test_request_context() tests/test_reqctx.py:125: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/app.py:2036: in test_request_context builder = EnvironBuilder(self, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning _________________________ test_manual_context_binding __________________________ app = def test_manual_context_binding(app): @app.route("/") def index(): return f"Hello {flask.request.args['name']}!" > ctx = app.test_request_context("/?name=World") tests/test_reqctx.py:139: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/app.py:2036: in test_request_context builder = EnvironBuilder(self, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/?name=World', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning _______________________ test_session_error_pops_context ________________________ def test_session_error_pops_context(): class SessionError(Exception): pass class FailingSessionInterface(SessionInterface): def open_session(self, app, request): raise SessionError() class CustomFlask(flask.Flask): session_interface = FailingSessionInterface() app = CustomFlask(__name__) @app.route("/") def index(): # shouldn't get here AssertionError() > response = app.test_client().get("/") tests/test_reqctx.py:222: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning _______________________ test_session_dynamic_cookie_name _______________________ def test_session_dynamic_cookie_name(): # This session interface will use a cookie with a different name if the # requested url ends with the string "dynamic_cookie" class PathAwareSessionInterface(SecureCookieSessionInterface): def get_cookie_name(self, app): if flask.request.url.endswith("dynamic_cookie"): return "dynamic_cookie_name" else: return super().get_cookie_name(app) class CustomFlask(flask.Flask): session_interface = PathAwareSessionInterface() app = CustomFlask(__name__) app.secret_key = "secret_key" @app.route("/set", methods=["POST"]) def set(): flask.session["value"] = flask.request.form["value"] return "value set" @app.route("/get") def get(): v = flask.session.get("value", "None") return v @app.route("/set_dynamic_cookie", methods=["POST"]) def set_dynamic_cookie(): flask.session["value"] = flask.request.form["value"] return "value set" @app.route("/get_dynamic_cookie") def get_dynamic_cookie(): v = flask.session.get("value", "None") return v test_client = app.test_client() # first set the cookie in both /set urls but each with a different value > assert test_client.post("/set", data={"value": "42"}).data == b"value set" tests/test_reqctx.py:268: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1248: in post return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/set', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning _____________________ test_bad_environ_raises_bad_request ______________________ def test_bad_environ_raises_bad_request(): app = flask.Flask(__name__) from flask.testing import EnvironBuilder > builder = EnvironBuilder(app) tests/test_reqctx.py:285: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ____________________ test_environ_for_valid_idna_completes _____________________ def test_environ_for_valid_idna_completes(): app = flask.Flask(__name__) @app.route("/") def index(): return "Hello World!" from flask.testing import EnvironBuilder > builder = EnvironBuilder(app) tests/test_reqctx.py:305: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ________________________ test_normal_environ_completes _________________________ def test_normal_environ_completes(): app = flask.Flask(__name__) @app.route("/") def index(): return "Hello World!" > response = app.test_client().get("/", headers={"host": "xn--on-0ia.com"}) tests/test_reqctx.py:324: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning _______________________ test_open_session_with_endpoint ________________________ def test_open_session_with_endpoint(): """If request.endpoint (or other URL matching behavior) is needed while loading the session, RequestContext.match_request() can be called manually. """ class MySessionInterface(SessionInterface): def save_session(self, app, session, response): pass def open_session(self, app, request): flask._request_ctx_stack.top.match_request() assert request.endpoint is not None app = flask.Flask(__name__) app.session_interface = MySessionInterface() @app.get("/") def index(): return "Hello, World!" > response = app.test_client().get("/") tests/test_session_interface.py:26: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ______________________ test_suppressed_exception_logging _______________________ def test_suppressed_exception_logging(): class SuppressedFlask(flask.Flask): def log_exception(self, exc_info): pass out = StringIO() app = SuppressedFlask(__name__) @app.route("/") def index(): raise Exception("test") > rv = app.test_client().get("/", errors_stream=out) tests/test_subclassing.py:18: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ___________________________ test_context_processing ____________________________ app = , client = > def test_context_processing(app, client): @app.context_processor def context_processor(): return {"injected_value": 42} @app.route("/") def index(): return flask.render_template("context_template.html", value=23) > rv = client.get("/") tests/test_templating.py:19: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ______________________________ test_original_win _______________________________ app = , client = > def test_original_win(app, client): @app.route("/") def index(): return flask.render_template_string("{{ config }}", config=42) > rv = client.get("/") tests/test_templating.py:28: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ____________________________ test_standard_context _____________________________ app = , client = > def test_standard_context(app, client): @app.route("/") def index(): flask.g.foo = 23 flask.session["test"] = "aha" return flask.render_template_string( """ {{ request.args.foo }} {{ g.foo }} {{ config.DEBUG }} {{ session.test }} """ ) > rv = client.get("/?foo=42") tests/test_templating.py:57: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/?foo=42', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ________________________________ test_escaping _________________________________ app = , client = > def test_escaping(app, client): text = "

Hello World!" @app.route("/") def index(): return flask.render_template( "escaping_template.html", text=text, html=flask.Markup(text) ) > lines = client.get("/").data.splitlines() tests/test_templating.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning _______________________________ test_no_escaping _______________________________ app = , client = > def test_no_escaping(app, client): text = "

Hello World!" @app.route("/") def index(): return flask.render_template( "non_escaping_template.txt", text=text, html=flask.Markup(text) ) > lines = client.get("/").data.splitlines() tests/test_templating.py:90: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ______________________ test_template_filter_with_template ______________________ app = , client = > def test_template_filter_with_template(app, client): @app.template_filter() def super_reverse(s): return s[::-1] @app.route("/") def index(): return flask.render_template("template_filter.html", value="abcd") > rv = client.get("/") tests/test_templating.py:162: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ____________________ test_add_template_filter_with_template ____________________ app = , client = > def test_add_template_filter_with_template(app, client): def super_reverse(s): return s[::-1] app.add_template_filter(super_reverse) @app.route("/") def index(): return flask.render_template("template_filter.html", value="abcd") > rv = client.get("/") tests/test_templating.py:176: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning _________________ test_template_filter_with_name_and_template __________________ app = , client = > def test_template_filter_with_name_and_template(app, client): @app.template_filter("super_reverse") def my_reverse(s): return s[::-1] @app.route("/") def index(): return flask.render_template("template_filter.html", value="abcd") > rv = client.get("/") tests/test_templating.py:189: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning _______________ test_add_template_filter_with_name_and_template ________________ app = , client = > def test_add_template_filter_with_name_and_template(app, client): def my_reverse(s): return s[::-1] app.add_template_filter(my_reverse, "super_reverse") @app.route("/") def index(): return flask.render_template("template_filter.html", value="abcd") > rv = client.get("/") tests/test_templating.py:203: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning _______________________ test_template_test_with_template _______________________ app = , client = > def test_template_test_with_template(app, client): @app.template_test() def boolean(value): return isinstance(value, bool) @app.route("/") def index(): return flask.render_template("template_test.html", value=False) > rv = client.get("/") tests/test_templating.py:256: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning _____________________ test_add_template_test_with_template _____________________ app = , client = > def test_add_template_test_with_template(app, client): def boolean(value): return isinstance(value, bool) app.add_template_test(boolean) @app.route("/") def index(): return flask.render_template("template_test.html", value=False) > rv = client.get("/") tests/test_templating.py:270: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning __________________ test_template_test_with_name_and_template ___________________ app = , client = > def test_template_test_with_name_and_template(app, client): @app.template_test("boolean") def is_boolean(value): return isinstance(value, bool) @app.route("/") def index(): return flask.render_template("template_test.html", value=False) > rv = client.get("/") tests/test_templating.py:283: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ________________ test_add_template_test_with_name_and_template _________________ app = , client = > def test_add_template_test_with_name_and_template(app, client): def is_boolean(value): return isinstance(value, bool) app.add_template_test(is_boolean, "boolean") @app.route("/") def index(): return flask.render_template("template_test.html", value=False) > rv = client.get("/") tests/test_templating.py:297: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning _________________________ test_custom_template_loader __________________________ client = > def test_custom_template_loader(client): class MyFlask(flask.Flask): def create_global_jinja_loader(self): from jinja2 import DictLoader return DictLoader({"index.html": "Hello Custom World!"}) app = MyFlask(__name__) @app.route("/") def index(): return flask.render_template("index.html") c = app.test_client() > rv = c.get("/") tests/test_templating.py:328: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning _____________________________ test_iterable_loader _____________________________ app = , client = > def test_iterable_loader(app, client): @app.context_processor def context_processor(): return {"whiskey": "Jameson"} @app.route("/") def index(): return flask.render_template( [ "no_template.xml", # should skip this one "simple_template.html", # should render this "context_template.html", ], value=23, ) > rv = client.get("/") tests/test_templating.py:348: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ________________________ test_template_loader_debugging ________________________ test_apps = None monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7fd924c055d0> def test_template_loader_debugging(test_apps, monkeypatch): from blueprintapp import app called = [] class _TestHandler(logging.Handler): def handle(self, record): called.append(True) text = str(record.msg) assert "1: trying loader of application 'blueprintapp'" in text assert ( "2: trying loader of blueprint 'admin' (blueprintapp.apps.admin)" ) in text assert ( "trying loader of blueprint 'frontend' (blueprintapp.apps.frontend)" ) in text assert "Error: the template could not be found" in text assert ( "looked up from an endpoint that belongs to the blueprint 'frontend'" ) in text assert "See https://flask.palletsprojects.com/blueprints/#templates" in text with app.test_client() as c: monkeypatch.setitem(app.config, "EXPLAIN_TEMPLATE_LOADING", True) monkeypatch.setattr( logging.getLogger("blueprintapp"), "handlers", [_TestHandler()] ) with pytest.raises(TemplateNotFound) as excinfo: > c.get("/missing") tests/test_templating.py:428: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/missing', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ______________________ test_environ_defaults_from_config _______________________ app = , client = > def test_environ_defaults_from_config(app, client): app.config["SERVER_NAME"] = "example.com:1234" app.config["APPLICATION_ROOT"] = "/foo" @app.route("/") def index(): return flask.request.url > ctx = app.test_request_context() tests/test_testing.py:26: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/app.py:2036: in test_request_context builder = EnvironBuilder(self, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning __________________________ test_environ_base_default ___________________________ app = , client = > app_ctx = def test_environ_base_default(app, client, app_ctx): @app.route("/") def index(): flask.g.user_agent = flask.request.headers["User-Agent"] return flask.request.remote_addr > rv = client.get("/") tests/test_testing.py:51: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning __________________________ test_environ_base_modified __________________________ app = , client = > app_ctx = def test_environ_base_modified(app, client, app_ctx): @app.route("/") def index(): flask.g.user_agent = flask.request.headers["User-Agent"] return flask.request.remote_addr client.environ_base["REMOTE_ADDR"] = "0.0.0.0" client.environ_base["HTTP_USER_AGENT"] = "Foo" > rv = client.get("/") tests/test_testing.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ___________________________ test_client_open_environ ___________________________ app = , client = > request = > def test_client_open_environ(app, client, request): @app.route("/index") def index(): return flask.request.remote_addr > builder = EnvironBuilder(app, path="/index", method="GET") tests/test_testing.py:80: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/index', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ___________________________ test_specify_url_scheme ____________________________ app = , client = > def test_specify_url_scheme(app, client): @app.route("/") def index(): return flask.request.url > ctx = app.test_request_context(url_scheme="https") tests/test_testing.py:97: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/app.py:2036: in test_request_context builder = EnvironBuilder(self, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning _______________________________ test_path_is_url _______________________________ app = def test_path_is_url(app): > eb = EnvironBuilder(app, "https://example.com/") tests/test_testing.py:105: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = 'https://example.com/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ________________________ test_environbuilder_json_dumps ________________________ app = def test_environbuilder_json_dumps(app): """EnvironBuilder.json_dumps() takes settings from the app.""" app.config["JSON_AS_ASCII"] = False > eb = EnvironBuilder(app, json="\u20ac") tests/test_testing.py:115: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ________________________ test_blueprint_with_subdomain _________________________ def test_blueprint_with_subdomain(): app = flask.Flask(__name__, subdomain_matching=True) app.config["SERVER_NAME"] = "example.com:1234" app.config["APPLICATION_ROOT"] = "/foo" client = app.test_client() bp = flask.Blueprint("company", __name__, subdomain="xxx") @bp.route("/") def index(): return flask.request.url app.register_blueprint(bp) > ctx = app.test_request_context("/", subdomain="xxx") tests/test_testing.py:133: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/app.py:2036: in test_request_context builder = EnvironBuilder(self, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning __________________________ test_redirect_keep_session __________________________ app = , client = > app_ctx = def test_redirect_keep_session(app, client, app_ctx): @app.route("/", methods=["GET", "POST"]) def index(): if flask.request.method == "POST": return flask.redirect("/getsession") flask.session["data"] = "foo" return "index" @app.route("/getsession") def get_session(): return flask.session.get("data", "") with client: > rv = client.get("/getsession") tests/test_testing.py:156: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/getsession', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning __________________________ test_session_transactions ___________________________ app = , client = > def test_session_transactions(app, client): @app.route("/") def index(): return str(flask.session["foo"]) with client: > with client.session_transaction() as sess: tests/test_testing.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.11/contextlib.py:137: in __enter__ return next(self.gen) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:140: in session_transaction if self.cookie_jar is None: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = > @property def cookie_jar(self) -> t.Iterable[Cookie] | None: > warnings.warn( "The 'cookie_jar' attribute is a private API and will be removed in" " Werkzeug 3.0. Use the 'get_cookie' method instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: The 'cookie_jar' attribute is a private API and will be removed in Werkzeug 3.0. Use the 'get_cookie' method instead. /usr/lib/python3.11/site-packages/werkzeug/test.py:862: DeprecationWarning __________________ test_session_transactions_no_null_sessions __________________ def test_session_transactions_no_null_sessions(): app = flask.Flask(__name__) app.testing = True with app.test_client() as c: with pytest.raises(RuntimeError) as e: > with c.session_transaction(): tests/test_testing.py:194: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.11/contextlib.py:137: in __enter__ return next(self.gen) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:140: in session_transaction if self.cookie_jar is None: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = > @property def cookie_jar(self) -> t.Iterable[Cookie] | None: > warnings.warn( "The 'cookie_jar' attribute is a private API and will be removed in" " Werkzeug 3.0. Use the 'get_cookie' method instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: The 'cookie_jar' attribute is a private API and will be removed in Werkzeug 3.0. Use the 'get_cookie' method instead. /usr/lib/python3.11/site-packages/werkzeug/test.py:862: DeprecationWarning ____________________ test_session_transaction_needs_cookies ____________________ app = def test_session_transaction_needs_cookies(app): c = app.test_client(use_cookies=False) with pytest.raises(RuntimeError) as e: > with c.session_transaction(): tests/test_testing.py:210: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.11/contextlib.py:137: in __enter__ return next(self.gen) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:140: in session_transaction if self.cookie_jar is None: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = > @property def cookie_jar(self) -> t.Iterable[Cookie] | None: > warnings.warn( "The 'cookie_jar' attribute is a private API and will be removed in" " Werkzeug 3.0. Use the 'get_cookie' method instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: The 'cookie_jar' attribute is a private API and will be removed in Werkzeug 3.0. Use the 'get_cookie' method instead. /usr/lib/python3.11/site-packages/werkzeug/test.py:862: DeprecationWarning _______________________ test_test_client_context_binding _______________________ app = , client = > def test_test_client_context_binding(app, client): app.testing = False @app.route("/") def index(): flask.g.value = 42 return "Hello World!" @app.route("/other") def other(): 1 // 0 with client: > resp = client.get("/") tests/test_testing.py:228: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ______________________________ test_reuse_client _______________________________ client = > def test_reuse_client(client): c = client with c: > assert client.get("/").status_code == 404 tests/test_testing.py:251: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ___________________ test_test_client_calls_teardown_handlers ___________________ app = , client = > def test_test_client_calls_teardown_handlers(app, client): called = [] @app.teardown_request def remember(error): called.append(error) with client: assert called == [] > client.get("/") tests/test_testing.py:266: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ____________________________ test_full_url_request _____________________________ app = , client = > def test_full_url_request(app, client): @app.route("/action", methods=["POST"]) def action(): return "x" with client: > rv = client.post("http://domain.com/action?vodka=42", data={"gin": 43}) tests/test_testing.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1248: in post return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = 'http://domain.com/action?vodka=42', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ________________________ test_json_request_and_response ________________________ app = , client = > def test_json_request_and_response(app, client): @app.route("/echo", methods=["POST"]) def echo(): return jsonify(flask.request.get_json()) with client: json_data = {"drink": {"gin": 1, "tonic": True}, "price": 10} > rv = client.post("/echo", json=json_data) tests/test_testing.py:299: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1248: in post return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/echo', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ________________________________ test_subdomain ________________________________ def test_subdomain(): app = flask.Flask(__name__, subdomain_matching=True) app.config["SERVER_NAME"] = "example.com" client = app.test_client() @app.route("/", subdomain="") def view(company_id): return company_id > with app.test_request_context(): tests/test_testing.py:341: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/app.py:2036: in test_request_context builder = EnvironBuilder(self, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning _______________________________ test_nosubdomain _______________________________ app = , client = > def test_nosubdomain(app, client): app.config["SERVER_NAME"] = "example.com" @app.route("/") def view(company_id): return company_id > with app.test_request_context(): tests/test_testing.py:358: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/app.py:2036: in test_request_context builder = EnvironBuilder(self, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning _________________________ test_error_handler_no_match __________________________ app = , client = > def test_error_handler_no_match(app, client): class CustomException(Exception): pass class UnacceptableCustomException(BaseException): pass @app.errorhandler(CustomException) def custom_exception_handler(e): assert isinstance(e, CustomException) return "custom" with pytest.raises( AssertionError, match="Custom exceptions must be subclasses of Exception." ): app.register_error_handler(UnacceptableCustomException, None) @app.errorhandler(500) def handle_500(e): assert isinstance(e, InternalServerError) original = getattr(e, "original_exception", None) if original is not None: return f"wrapped {type(original).__name__}" return "direct" @app.route("/custom") def custom_test(): raise CustomException() @app.route("/keyerror") def key_error(): raise KeyError() @app.route("/abort") def do_abort(): flask.abort(500) app.testing = False > assert client.get("/custom").data == b"custom" tests/test_user_error_handler.py:50: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/custom', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning _________________________ test_error_handler_subclass __________________________ app = def test_error_handler_subclass(app): class ParentException(Exception): pass class ChildExceptionUnregistered(ParentException): pass class ChildExceptionRegistered(ParentException): pass @app.errorhandler(ParentException) def parent_exception_handler(e): assert isinstance(e, ParentException) return "parent" @app.errorhandler(ChildExceptionRegistered) def child_exception_handler(e): assert isinstance(e, ChildExceptionRegistered) return "child-registered" @app.route("/parent") def parent_test(): raise ParentException() @app.route("/child-unregistered") def unregistered_test(): raise ChildExceptionUnregistered() @app.route("/child-registered") def registered_test(): raise ChildExceptionRegistered() c = app.test_client() > assert c.get("/parent").data == b"parent" tests/test_user_error_handler.py:89: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/parent', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning _______________________ test_error_handler_http_subclass _______________________ app = def test_error_handler_http_subclass(app): class ForbiddenSubclassRegistered(Forbidden): pass class ForbiddenSubclassUnregistered(Forbidden): pass @app.errorhandler(403) def code_exception_handler(e): assert isinstance(e, Forbidden) return "forbidden" @app.errorhandler(ForbiddenSubclassRegistered) def subclass_exception_handler(e): assert isinstance(e, ForbiddenSubclassRegistered) return "forbidden-registered" @app.route("/forbidden") def forbidden_test(): raise Forbidden() @app.route("/forbidden-registered") def registered_test(): raise ForbiddenSubclassRegistered() @app.route("/forbidden-unregistered") def unregistered_test(): raise ForbiddenSubclassUnregistered() c = app.test_client() > assert c.get("/forbidden").data == b"forbidden" tests/test_user_error_handler.py:125: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/forbidden', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning _________________________ test_error_handler_blueprint _________________________ app = def test_error_handler_blueprint(app): bp = flask.Blueprint("bp", __name__) @bp.errorhandler(500) def bp_exception_handler(e): return "bp-error" @bp.route("/error") def bp_test(): raise InternalServerError() @app.errorhandler(500) def app_exception_handler(e): return "app-error" @app.route("/error") def app_test(): raise InternalServerError() app.register_blueprint(bp, url_prefix="/bp") c = app.test_client() > assert c.get("/error").data == b"app-error" tests/test_user_error_handler.py:153: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/error', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning __________________________ test_default_error_handler __________________________ def test_default_error_handler(): bp = flask.Blueprint("bp", __name__) @bp.errorhandler(HTTPException) def bp_exception_handler(e): assert isinstance(e, HTTPException) assert isinstance(e, NotFound) return "bp-default" @bp.errorhandler(Forbidden) def bp_forbidden_handler(e): assert isinstance(e, Forbidden) return "bp-forbidden" @bp.route("/undefined") def bp_registered_test(): raise NotFound() @bp.route("/forbidden") def bp_forbidden_test(): raise Forbidden() app = flask.Flask(__name__) @app.errorhandler(HTTPException) def catchall_exception_handler(e): assert isinstance(e, HTTPException) assert isinstance(e, NotFound) return "default" @app.errorhandler(Forbidden) def catchall_forbidden_handler(e): assert isinstance(e, Forbidden) return "forbidden" @app.route("/forbidden") def forbidden(): raise Forbidden() @app.route("/slash/") def slash(): return "slash" app.register_blueprint(bp, url_prefix="/bp") c = app.test_client() > assert c.get("/bp/undefined").data == b"bp-default" tests/test_user_error_handler.py:203: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/bp/undefined', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ______ TestGenericHandlers.test_handle_class_or_code[InternalServerError] ______ self = app = , client = > to_handle = @pytest.mark.parametrize("to_handle", (InternalServerError, 500)) def test_handle_class_or_code(self, app, client, to_handle): """``InternalServerError`` and ``500`` are aliases, they should have the same behavior. Both should only receive ``InternalServerError``, which might wrap another error. """ @app.errorhandler(to_handle) def handle_500(e): assert isinstance(e, InternalServerError) return self.report_error(e) > assert client.get("/custom").data == b"wrapped Custom" tests/test_user_error_handler.py:258: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/custom', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ______________ TestGenericHandlers.test_handle_class_or_code[500] ______________ self = app = , client = > to_handle = 500 @pytest.mark.parametrize("to_handle", (InternalServerError, 500)) def test_handle_class_or_code(self, app, client, to_handle): """``InternalServerError`` and ``500`` are aliases, they should have the same behavior. Both should only receive ``InternalServerError``, which might wrap another error. """ @app.errorhandler(to_handle) def handle_500(e): assert isinstance(e, InternalServerError) return self.report_error(e) > assert client.get("/custom").data == b"wrapped Custom" tests/test_user_error_handler.py:258: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/custom', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning _________________ TestGenericHandlers.test_handle_generic_http _________________ self = app = , client = > def test_handle_generic_http(self, app, client): """``HTTPException`` should only receive ``HTTPException`` subclasses. It will receive ``404`` routing exceptions. """ @app.errorhandler(HTTPException) def handle_http(e): assert isinstance(e, HTTPException) return str(e.code) > assert client.get("/error").data == b"500" tests/test_user_error_handler.py:273: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/error', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ___________________ TestGenericHandlers.test_handle_generic ____________________ self = app = , client = > def test_handle_generic(self, app, client): """Generic ``Exception`` will handle all exceptions directly, including ``HTTPExceptions``. """ @app.errorhandler(Exception) def handle_exception(e): return self.report_error(e) > assert client.get("/custom").data == b"direct Custom" tests/test_user_error_handler.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/custom', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning _______________________________ test_basic_view ________________________________ app = def test_basic_view(app): class Index(flask.views.View): methods = ["GET", "POST"] def dispatch_request(self): return flask.request.method app.add_url_rule("/", view_func=Index.as_view("index")) > common_test(app) tests/test_views.py:25: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_views.py:10: in common_test assert c.get("/").data == b"GET" /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ____________________________ test_method_based_view ____________________________ app = def test_method_based_view(app): class Index(flask.views.MethodView): def get(self): return "GET" def post(self): return "POST" app.add_url_rule("/", view_func=Index.as_view("index")) > common_test(app) tests/test_views.py:38: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_views.py:10: in common_test assert c.get("/").data == b"GET" /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ______________________________ test_view_patching ______________________________ app = def test_view_patching(app): class Index(flask.views.MethodView): def get(self): 1 // 0 def post(self): 1 // 0 class Other(Index): def get(self): return "GET" def post(self): return "POST" view = Index.as_view("index") view.view_class = Other app.add_url_rule("/", view_func=view) > common_test(app) tests/test_views.py:59: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_views.py:10: in common_test assert c.get("/").data == b"GET" /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ____________________________ test_view_inheritance _____________________________ app = , client = > def test_view_inheritance(app, client): class Index(flask.views.MethodView): def get(self): return "GET" def post(self): return "POST" class BetterIndex(Index): def delete(self): return "DELETE" app.add_url_rule("/", view_func=BetterIndex.as_view("index")) > meths = parse_set_header(client.open("/", method="OPTIONS").headers["Allow"]) tests/test_views.py:76: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning _____________________________ test_view_decorators _____________________________ app = , client = > def test_view_decorators(app, client): def add_x_parachute(f): def new_function(*args, **kwargs): resp = flask.make_response(f(*args, **kwargs)) resp.headers["X-Parachute"] = "awesome" return resp return new_function class Index(flask.views.View): decorators = [add_x_parachute] def dispatch_request(self): return "Awesome" app.add_url_rule("/", view_func=Index.as_view("index")) > rv = client.get("/") tests/test_views.py:96: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ___________________ test_view_provide_automatic_options_attr ___________________ def test_view_provide_automatic_options_attr(): app = flask.Flask(__name__) class Index1(flask.views.View): provide_automatic_options = False def dispatch_request(self): return "Hello World!" app.add_url_rule("/", view_func=Index1.as_view("index")) c = app.test_client() > rv = c.open("/", method="OPTIONS") tests/test_views.py:112: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ______________________________ test_implicit_head ______________________________ app = , client = > def test_implicit_head(app, client): class Index(flask.views.MethodView): def get(self): return flask.Response("Blub", headers={"X-Method": flask.request.method}) app.add_url_rule("/", view_func=Index.as_view("index")) > rv = client.get("/") tests/test_views.py:147: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ______________________________ test_explicit_head ______________________________ app = , client = > def test_explicit_head(app, client): class Index(flask.views.MethodView): def get(self): return "GET" def head(self): return flask.Response("", headers={"X-Method": "HEAD"}) app.add_url_rule("/", view_func=Index.as_view("index")) > rv = client.get("/") tests/test_views.py:164: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ____________________________ test_endpoint_override ____________________________ app = def test_endpoint_override(app): app.debug = True class Index(flask.views.View): methods = ["GET", "POST"] def dispatch_request(self): return flask.request.method app.add_url_rule("/", view_func=Index.as_view("index")) with pytest.raises(AssertionError): app.add_url_rule("/", view_func=Index.as_view("index")) # But these tests should still pass. We just log a warning. > common_test(app) tests/test_views.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_views.py:10: in common_test assert c.get("/").data == b"GET" /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning _________________________ test_methods_var_inheritance _________________________ app = , client = > def test_methods_var_inheritance(app, client): class BaseView(flask.views.MethodView): methods = ["GET", "PROPFIND"] class ChildView(BaseView): def get(self): return "GET" def propfind(self): return "PROPFIND" app.add_url_rule("/", view_func=ChildView.as_view("index")) > assert client.get("/").data == b"GET" tests/test_views.py:202: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning __________________________ test_multiple_inheritance ___________________________ app = , client = > def test_multiple_inheritance(app, client): class GetView(flask.views.MethodView): def get(self): return "GET" class DeleteView(flask.views.MethodView): def delete(self): return "DELETE" class GetDeleteView(GetView, DeleteView): pass app.add_url_rule("/", view_func=GetDeleteView.as_view("index")) > assert client.get("/").data == b"GET" tests/test_views.py:221: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning ________________________ test_remove_method_from_parent ________________________ app = , client = > def test_remove_method_from_parent(app, client): class GetView(flask.views.MethodView): def get(self): return "GET" class OtherView(flask.views.MethodView): def post(self): return "POST" class View(GetView, OtherView): methods = ["GET"] app.add_url_rule("/", view_func=View.as_view("index")) > assert client.get("/").data == b"GET" tests/test_views.py:240: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/werkzeug/test.py:1243: in get return self.open(*args, **kw) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:215: in open request = self._request_from_builder_args(args, kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:184: in _request_from_builder_args builder = EnvironBuilder(self.application, *args, **kwargs) ../../BUILDROOT/python-flask-2.1.3-5.ocs23.noarch/usr/lib/python3.11/site-packages/flask/testing.py:71: in __init__ url = url_parse(path) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = '/', scheme = None, allow_fragments = True def url_parse( url: str, scheme: str | None = None, allow_fragments: bool = True ) -> BaseURL: """Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting `allow_fragments` to `False`. The inverse of this function is :func:`url_unparse`. :param url: the URL to parse. :param scheme: the default schema to use if the URL is schemaless. :param allow_fragments: if set to `False` a fragment will be removed from the URL. .. deprecated:: 2.3 Will be removed in Werkzeug 3.0. Use ``urllib.parse.urlsplit`` instead. """ > warnings.warn( "'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0." " Use 'urllib.parse.urlsplit' instead.", DeprecationWarning, stacklevel=2, ) E DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead. /usr/lib/python3.11/site-packages/werkzeug/urls.py:505: DeprecationWarning =========================== short test summary info ============================ FAILED tests/test_appctx.py::test_request_context_means_app_context - Depreca... FAILED tests/test_appctx.py::test_app_tearing_down_with_handled_exception_by_app_handler FAILED tests/test_appctx.py::test_app_tearing_down_with_unhandled_exception FAILED tests/test_appctx.py::test_context_refcounts - DeprecationWarning: 'we... FAILED tests/test_appctx.py::test_clean_pop - DeprecationWarning: 'werkzeug.u... FAILED tests/test_basic.py::test_options_work - DeprecationWarning: 'werkzeug... FAILED tests/test_basic.py::test_options_on_multiple_rules - DeprecationWarni... FAILED tests/test_basic.py::test_method_route[get] - DeprecationWarning: 'wer... FAILED tests/test_basic.py::test_method_route[post] - DeprecationWarning: 'we... FAILED tests/test_basic.py::test_method_route[put] - DeprecationWarning: 'wer... FAILED tests/test_basic.py::test_method_route[delete] - DeprecationWarning: '... FAILED tests/test_basic.py::test_method_route[patch] - DeprecationWarning: 'w... FAILED tests/test_basic.py::test_provide_automatic_options_attr - Deprecation... FAILED tests/test_basic.py::test_provide_automatic_options_kwarg - Deprecatio... FAILED tests/test_basic.py::test_request_dispatching - DeprecationWarning: 'w... FAILED tests/test_basic.py::test_url_mapping - DeprecationWarning: 'werkzeug.... FAILED tests/test_basic.py::test_werkzeug_routing - DeprecationWarning: 'werk... FAILED tests/test_basic.py::test_endpoint_decorator - DeprecationWarning: 'we... FAILED tests/test_basic.py::test_session - DeprecationWarning: 'werkzeug.urls... FAILED tests/test_basic.py::test_session_using_server_name - AssertionError: ... FAILED tests/test_basic.py::test_session_using_server_name_and_port - Asserti... FAILED tests/test_basic.py::test_session_using_session_settings - AssertionEr... FAILED tests/test_basic.py::test_session_using_samesite_attribute - Deprecati... FAILED tests/test_basic.py::test_missing_session - DeprecationWarning: 'werkz... FAILED tests/test_basic.py::test_session_expiration - DeprecationWarning: 'we... FAILED tests/test_basic.py::test_session_stored_last - DeprecationWarning: 'w... FAILED tests/test_basic.py::test_session_special_types - DeprecationWarning: ... FAILED tests/test_basic.py::test_session_cookie_setting - DeprecationWarning:... FAILED tests/test_basic.py::test_session_vary_cookie - DeprecationWarning: 'w... FAILED tests/test_basic.py::test_extended_flashing - DeprecationWarning: 'wer... FAILED tests/test_basic.py::test_request_processing - DeprecationWarning: 'we... FAILED tests/test_basic.py::test_request_preprocessing_early_return - Depreca... FAILED tests/test_basic.py::test_after_request_processing - DeprecationWarnin... FAILED tests/test_basic.py::test_teardown_request_handler - DeprecationWarnin... FAILED tests/test_basic.py::test_teardown_request_handler_debug_mode - Deprec... FAILED tests/test_basic.py::test_teardown_request_handler_error - Deprecation... FAILED tests/test_basic.py::test_before_after_request_order - DeprecationWarn... FAILED tests/test_basic.py::test_error_handling - DeprecationWarning: 'werkze... FAILED tests/test_basic.py::test_error_handling_processing - DeprecationWarni... FAILED tests/test_basic.py::test_baseexception_error_handling - DeprecationWa... FAILED tests/test_basic.py::test_before_request_and_routing_errors - Deprecat... FAILED tests/test_basic.py::test_user_error_handling - DeprecationWarning: 'w... FAILED tests/test_basic.py::test_http_error_subclass_handling - DeprecationWa... FAILED tests/test_basic.py::test_errorhandler_precedence - DeprecationWarning... FAILED tests/test_basic.py::test_trapping_of_bad_request_key_errors - Depreca... FAILED tests/test_basic.py::test_trapping_of_all_http_exceptions - Deprecatio... FAILED tests/test_basic.py::test_error_handler_after_processor_error - Deprec... FAILED tests/test_basic.py::test_enctype_debug_helper - DeprecationWarning: '... FAILED tests/test_basic.py::test_response_types - DeprecationWarning: 'werkze... FAILED tests/test_basic.py::test_response_type_errors - DeprecationWarning: '... FAILED tests/test_basic.py::test_build_error_handler - DeprecationWarning: 'w... FAILED tests/test_basic.py::test_build_error_handler_reraise - DeprecationWar... FAILED tests/test_basic.py::test_url_for_passes_special_values_to_build_error_handler FAILED tests/test_basic.py::test_static_files - DeprecationWarning: 'werkzeug... FAILED tests/test_basic.py::test_static_url_path - DeprecationWarning: 'werkz... FAILED tests/test_basic.py::test_static_url_path_with_ending_slash - Deprecat... FAILED tests/test_basic.py::test_static_url_empty_path - DeprecationWarning: ... FAILED tests/test_basic.py::test_static_url_empty_path_default - DeprecationW... FAILED tests/test_basic.py::test_static_folder_with_pathlib_path - Deprecatio... FAILED tests/test_basic.py::test_static_folder_with_ending_slash - Deprecatio... FAILED tests/test_basic.py::test_static_route_with_host_matching - Deprecatio... FAILED tests/test_basic.py::test_server_name_subdomain - DeprecationWarning: ... FAILED tests/test_basic.py::test_max_content_length - DeprecationWarning: 'we... FAILED tests/test_basic.py::test_url_processors - DeprecationWarning: 'werkze... FAILED tests/test_basic.py::test_inject_blueprint_url_defaults - DeprecationW... FAILED tests/test_basic.py::test_nonascii_pathinfo - DeprecationWarning: 'wer... FAILED tests/test_basic.py::test_debug_mode_complains_after_first_request - D... FAILED tests/test_basic.py::test_before_first_request_functions - Deprecation... FAILED tests/test_basic.py::test_before_first_request_functions_concurrent - ... FAILED tests/test_basic.py::test_routing_redirect_debugging - DeprecationWarn... FAILED tests/test_basic.py::test_route_decorator_custom_endpoint - Deprecatio... FAILED tests/test_basic.py::test_preserve_only_once - DeprecationWarning: 'we... FAILED tests/test_basic.py::test_preserve_remembers_exception - DeprecationWa... FAILED tests/test_basic.py::test_multi_route_rules - DeprecationWarning: 'wer... FAILED tests/test_basic.py::test_multi_route_class_views - DeprecationWarning... FAILED tests/test_basic.py::test_max_cookie_size - assert 3 == 1 FAILED tests/test_blueprints.py::test_blueprint_specific_error_handling - Dep... FAILED tests/test_blueprints.py::test_blueprint_specific_user_error_handling FAILED tests/test_blueprints.py::test_blueprint_app_error_handling - Deprecat... FAILED tests/test_blueprints.py::test_blueprint_prefix_slash[-/-/] - Deprecat... FAILED tests/test_blueprints.py::test_blueprint_prefix_slash[/--/] - Deprecat... FAILED tests/test_blueprints.py::test_blueprint_prefix_slash[/-/-/] - Depreca... FAILED tests/test_blueprints.py::test_blueprint_prefix_slash[/foo--/foo] - De... FAILED tests/test_blueprints.py::test_blueprint_prefix_slash[/foo/--/foo/] - ... FAILED tests/test_blueprints.py::test_blueprint_prefix_slash[-/bar-/bar] - De... FAILED tests/test_blueprints.py::test_blueprint_prefix_slash[/foo/-/bar-/foo/bar] FAILED tests/test_blueprints.py::test_blueprint_prefix_slash[/foo/-bar-/foo/bar] FAILED tests/test_blueprints.py::test_blueprint_prefix_slash[/foo-/bar-/foo/bar] FAILED tests/test_blueprints.py::test_blueprint_prefix_slash[/foo/-//bar-/foo/bar] FAILED tests/test_blueprints.py::test_blueprint_prefix_slash[/foo//-/bar-/foo/bar] FAILED tests/test_blueprints.py::test_blueprint_url_defaults - DeprecationWar... FAILED tests/test_blueprints.py::test_blueprint_url_processors - DeprecationW... FAILED tests/test_blueprints.py::test_templates_and_static - DeprecationWarni... FAILED tests/test_blueprints.py::test_default_static_max_age - DeprecationWar... FAILED tests/test_blueprints.py::test_dotted_names_from_app - DeprecationWarn... FAILED tests/test_blueprints.py::test_empty_url_defaults - DeprecationWarning... FAILED tests/test_blueprints.py::test_route_decorator_custom_endpoint - Depre... FAILED tests/test_blueprints.py::test_endpoint_decorator - DeprecationWarning... FAILED tests/test_blueprints.py::test_template_filter_with_template - Depreca... FAILED tests/test_blueprints.py::test_template_filter_after_route_with_template FAILED tests/test_blueprints.py::test_add_template_filter_with_template - Dep... FAILED tests/test_blueprints.py::test_template_filter_with_name_and_template FAILED tests/test_blueprints.py::test_add_template_filter_with_name_and_template FAILED tests/test_blueprints.py::test_template_test_with_template - Deprecati... FAILED tests/test_blueprints.py::test_template_test_after_route_with_template FAILED tests/test_blueprints.py::test_add_template_test_with_template - Depre... FAILED tests/test_blueprints.py::test_template_test_with_name_and_template - ... FAILED tests/test_blueprints.py::test_add_template_test_with_name_and_template FAILED tests/test_blueprints.py::test_context_processing - DeprecationWarning... FAILED tests/test_blueprints.py::test_request_processing - DeprecationWarning... FAILED tests/test_blueprints.py::test_app_request_processing - DeprecationWar... FAILED tests/test_blueprints.py::test_app_url_processors - DeprecationWarning... FAILED tests/test_blueprints.py::test_nested_blueprint - DeprecationWarning: ... FAILED tests/test_blueprints.py::test_nested_callback_order - DeprecationWarn... FAILED tests/test_blueprints.py::test_nesting_url_prefixes[/parent-/child-None-None] FAILED tests/test_blueprints.py::test_nesting_url_prefixes[/parent-None-None-/child] FAILED tests/test_blueprints.py::test_nesting_url_prefixes[None-None-/parent-/child] FAILED tests/test_blueprints.py::test_nesting_url_prefixes[/other-/something-/parent-/child] FAILED tests/test_blueprints.py::test_blueprint_renaming - DeprecationWarning... FAILED tests/test_converters.py::test_custom_converters - DeprecationWarning:... FAILED tests/test_converters.py::test_context_available - DeprecationWarning:... FAILED tests/test_helpers.py::TestStreaming::test_streaming_with_context - De... FAILED tests/test_helpers.py::TestStreaming::test_streaming_with_context_as_decorator FAILED tests/test_helpers.py::TestStreaming::test_streaming_with_context_and_custom_close FAILED tests/test_helpers.py::TestStreaming::test_stream_keeps_session - Depr... FAILED tests/test_helpers.py::TestHelpers::test_make_response - DeprecationWa... FAILED tests/test_json.py::test_bad_request_debug_message[True] - Deprecation... FAILED tests/test_json.py::test_bad_request_debug_message[False] - Deprecatio... FAILED tests/test_json.py::test_json_bad_requests - DeprecationWarning: 'werk... FAILED tests/test_json.py::test_json_custom_mimetypes - DeprecationWarning: '... FAILED tests/test_json.py::test_jsonify_basic_types[0] - DeprecationWarning: ... FAILED tests/test_json.py::test_jsonify_basic_types[-1] - DeprecationWarning:... FAILED tests/test_json.py::test_jsonify_basic_types[1] - DeprecationWarning: ... FAILED tests/test_json.py::test_jsonify_basic_types[23] - DeprecationWarning:... FAILED tests/test_json.py::test_jsonify_basic_types[3.14] - DeprecationWarnin... FAILED tests/test_json.py::test_jsonify_basic_types[s] - DeprecationWarning: ... FAILED tests/test_json.py::test_jsonify_basic_types[longer string] - Deprecat... FAILED tests/test_json.py::test_jsonify_basic_types[True] - DeprecationWarnin... FAILED tests/test_json.py::test_jsonify_basic_types[False] - DeprecationWarni... FAILED tests/test_json.py::test_jsonify_basic_types[None] - DeprecationWarnin... FAILED tests/test_json.py::test_jsonify_dicts - DeprecationWarning: 'werkzeug... FAILED tests/test_json.py::test_jsonify_arrays - DeprecationWarning: 'werkzeu... FAILED tests/test_json.py::test_jsonify_datetime[value0] - DeprecationWarning... FAILED tests/test_json.py::test_jsonify_datetime[value1] - DeprecationWarning... FAILED tests/test_json.py::test_jsonify_uuid_types - DeprecationWarning: 'wer... FAILED tests/test_json.py::test_json_attr - DeprecationWarning: 'werkzeug.url... FAILED tests/test_json.py::test_json_customization - DeprecationWarning: 'wer... FAILED tests/test_json.py::test_blueprint_json_customization - DeprecationWar... FAILED tests/test_json.py::test_modified_url_encoding - DeprecationWarning: '... FAILED tests/test_json.py::test_json_key_sorting - DeprecationWarning: 'werkz... FAILED tests/test_logging.py::test_wsgi_errors_stream - DeprecationWarning: '... FAILED tests/test_logging.py::test_log_view_exception - DeprecationWarning: '... FAILED tests/test_regression.py::test_aborting - DeprecationWarning: 'werkzeu... FAILED tests/test_reqctx.py::test_teardown_on_pop - DeprecationWarning: 'werk... FAILED tests/test_reqctx.py::test_teardown_with_previous_exception - Deprecat... FAILED tests/test_reqctx.py::test_teardown_with_handled_exception - Deprecati... FAILED tests/test_reqctx.py::test_proper_test_request_context - DeprecationWa... FAILED tests/test_reqctx.py::test_context_binding - DeprecationWarning: 'werk... FAILED tests/test_reqctx.py::test_context_test - DeprecationWarning: 'werkzeu... FAILED tests/test_reqctx.py::test_manual_context_binding - DeprecationWarning... FAILED tests/test_reqctx.py::test_session_error_pops_context - DeprecationWar... FAILED tests/test_reqctx.py::test_session_dynamic_cookie_name - DeprecationWa... FAILED tests/test_reqctx.py::test_bad_environ_raises_bad_request - Deprecatio... FAILED tests/test_reqctx.py::test_environ_for_valid_idna_completes - Deprecat... FAILED tests/test_reqctx.py::test_normal_environ_completes - DeprecationWarni... FAILED tests/test_session_interface.py::test_open_session_with_endpoint - Dep... FAILED tests/test_subclassing.py::test_suppressed_exception_logging - Depreca... FAILED tests/test_templating.py::test_context_processing - DeprecationWarning... FAILED tests/test_templating.py::test_original_win - DeprecationWarning: 'wer... FAILED tests/test_templating.py::test_standard_context - DeprecationWarning: ... FAILED tests/test_templating.py::test_escaping - DeprecationWarning: 'werkzeu... FAILED tests/test_templating.py::test_no_escaping - DeprecationWarning: 'werk... FAILED tests/test_templating.py::test_template_filter_with_template - Depreca... FAILED tests/test_templating.py::test_add_template_filter_with_template - Dep... FAILED tests/test_templating.py::test_template_filter_with_name_and_template FAILED tests/test_templating.py::test_add_template_filter_with_name_and_template FAILED tests/test_templating.py::test_template_test_with_template - Deprecati... FAILED tests/test_templating.py::test_add_template_test_with_template - Depre... FAILED tests/test_templating.py::test_template_test_with_name_and_template - ... FAILED tests/test_templating.py::test_add_template_test_with_name_and_template FAILED tests/test_templating.py::test_custom_template_loader - DeprecationWar... FAILED tests/test_templating.py::test_iterable_loader - DeprecationWarning: '... FAILED tests/test_templating.py::test_template_loader_debugging - Deprecation... FAILED tests/test_testing.py::test_environ_defaults_from_config - Deprecation... FAILED tests/test_testing.py::test_environ_base_default - DeprecationWarning:... FAILED tests/test_testing.py::test_environ_base_modified - DeprecationWarning... FAILED tests/test_testing.py::test_client_open_environ - DeprecationWarning: ... FAILED tests/test_testing.py::test_specify_url_scheme - DeprecationWarning: '... FAILED tests/test_testing.py::test_path_is_url - DeprecationWarning: 'werkzeu... FAILED tests/test_testing.py::test_environbuilder_json_dumps - DeprecationWar... FAILED tests/test_testing.py::test_blueprint_with_subdomain - DeprecationWarn... FAILED tests/test_testing.py::test_redirect_keep_session - DeprecationWarning... FAILED tests/test_testing.py::test_session_transactions - DeprecationWarning:... FAILED tests/test_testing.py::test_session_transactions_no_null_sessions - De... FAILED tests/test_testing.py::test_session_transaction_needs_cookies - Deprec... FAILED tests/test_testing.py::test_test_client_context_binding - DeprecationW... FAILED tests/test_testing.py::test_reuse_client - DeprecationWarning: 'werkze... FAILED tests/test_testing.py::test_test_client_calls_teardown_handlers - Depr... FAILED tests/test_testing.py::test_full_url_request - DeprecationWarning: 'we... FAILED tests/test_testing.py::test_json_request_and_response - DeprecationWar... FAILED tests/test_testing.py::test_subdomain - DeprecationWarning: 'werkzeug.... FAILED tests/test_testing.py::test_nosubdomain - DeprecationWarning: 'werkzeu... FAILED tests/test_user_error_handler.py::test_error_handler_no_match - Deprec... FAILED tests/test_user_error_handler.py::test_error_handler_subclass - Deprec... FAILED tests/test_user_error_handler.py::test_error_handler_http_subclass - D... FAILED tests/test_user_error_handler.py::test_error_handler_blueprint - Depre... FAILED tests/test_user_error_handler.py::test_default_error_handler - Depreca... FAILED tests/test_user_error_handler.py::TestGenericHandlers::test_handle_class_or_code[InternalServerError] FAILED tests/test_user_error_handler.py::TestGenericHandlers::test_handle_class_or_code[500] FAILED tests/test_user_error_handler.py::TestGenericHandlers::test_handle_generic_http FAILED tests/test_user_error_handler.py::TestGenericHandlers::test_handle_generic FAILED tests/test_views.py::test_basic_view - DeprecationWarning: 'werkzeug.u... FAILED tests/test_views.py::test_method_based_view - DeprecationWarning: 'wer... FAILED tests/test_views.py::test_view_patching - DeprecationWarning: 'werkzeu... FAILED tests/test_views.py::test_view_inheritance - DeprecationWarning: 'werk... FAILED tests/test_views.py::test_view_decorators - DeprecationWarning: 'werkz... FAILED tests/test_views.py::test_view_provide_automatic_options_attr - Deprec... FAILED tests/test_views.py::test_implicit_head - DeprecationWarning: 'werkzeu... FAILED tests/test_views.py::test_explicit_head - DeprecationWarning: 'werkzeu... FAILED tests/test_views.py::test_endpoint_override - DeprecationWarning: 'wer... FAILED tests/test_views.py::test_methods_var_inheritance - DeprecationWarning... FAILED tests/test_views.py::test_multiple_inheritance - DeprecationWarning: '... FAILED tests/test_views.py::test_remove_method_from_parent - DeprecationWarni... ERROR tests/test_basic.py::test_flashes - DeprecationWarning: 'werkzeug.urls.... ERROR tests/test_basic.py::test_make_response - DeprecationWarning: 'werkzeug... ERROR tests/test_basic.py::test_make_response_with_response_instance - Deprec... ERROR tests/test_basic.py::test_jsonify_no_prettyprint - DeprecationWarning: ... ERROR tests/test_basic.py::test_jsonify_prettyprint - DeprecationWarning: 'we... ERROR tests/test_basic.py::test_jsonify_mimetype - DeprecationWarning: 'werkz... ERROR tests/test_basic.py::test_json_dump_dataclass - DeprecationWarning: 'we... ERROR tests/test_basic.py::test_jsonify_args_and_kwargs_check - DeprecationWa... ERROR tests/test_basic.py::test_url_generation - DeprecationWarning: 'werkzeu... ERROR tests/test_helpers.py::TestSendfile::test_send_file - DeprecationWarnin... ERROR tests/test_helpers.py::TestSendfile::test_static_file - DeprecationWarn... ERROR tests/test_helpers.py::TestSendfile::test_send_from_directory - Depreca... ERROR tests/test_helpers.py::TestUrlFor::test_url_for_with_anchor - Deprecati... ERROR tests/test_helpers.py::TestUrlFor::test_url_for_with_scheme - Deprecati... ERROR tests/test_helpers.py::TestUrlFor::test_url_for_with_scheme_not_external ERROR tests/test_helpers.py::TestUrlFor::test_url_for_with_alternating_schemes ERROR tests/test_helpers.py::TestUrlFor::test_url_with_method - DeprecationWa... ERROR tests/test_json.py::test_tojson_filter - DeprecationWarning: 'werkzeug.... ERROR tests/test_templating.py::test_escaping_without_template_filename - Dep... ERROR tests/test_templating.py::test_macros - DeprecationWarning: 'werkzeug.u... ERROR tests/test_testing.py::test_environ_defaults - DeprecationWarning: 'wer... ERROR tests/test_testing.py::test_session_transactions_keep_context - Depreca... ERROR tests/test_testing.py::test_client_pop_all_preserved - DeprecationWarni... =========== 223 failed, 213 passed, 14 skipped, 23 errors in 13.57s ============ RPM build errors: error: Bad exit status from /var/tmp/rpm-tmp.FY3hMU (%check) Bad exit status from /var/tmp/rpm-tmp.FY3hMU (%check) Child return code was: 1 EXCEPTION: [Error('Command failed: \n # bash --login -c /usr/bin/rpmbuild -bb --noclean --target noarch --nodeps /builddir/build/SPECS/python-flask.spec\n', 1)] Traceback (most recent call last): File "/usr/lib/python3.10/site-packages/mockbuild/trace_decorator.py", line 93, in trace result = func(*args, **kw) File "/usr/lib/python3.10/site-packages/mockbuild/util.py", line 597, in do_with_status raise exception.Error("Command failed: \n # %s\n%s" % (command, output), child.returncode) mockbuild.exception.Error: Command failed: # bash --login -c /usr/bin/rpmbuild -bb --noclean --target noarch --nodeps /builddir/build/SPECS/python-flask.spec