From 985bb9383954f0ec3773a8f8863ef4484bedc1fe Mon Sep 17 00:00:00 2001 From: "Brian S. Stephan" Date: Tue, 19 Apr 2022 07:17:14 -0500 Subject: [PATCH] do a requirements bump notable changes: * Flask 1.1 treats redirects to itself as relative URLs now, so a spate of tests were updated --- requirements/requirements-dev.in | 2 +- requirements/requirements-dev.txt | 21 ++++++++++----------- requirements/requirements.txt | 8 ++++---- tests/functional_tests.py | 12 ++++++------ 4 files changed, 21 insertions(+), 22 deletions(-) diff --git a/requirements/requirements-dev.in b/requirements/requirements-dev.in index 10ef18e..af7c7f1 100644 --- a/requirements/requirements-dev.in +++ b/requirements/requirements-dev.in @@ -6,7 +6,7 @@ pytest pytest-cov # linting and other static code analysis -bandit==1.6.2 # pinned because 1.7.0 wasn't running right in tox +bandit dlint flake8 flake8-blind-except diff --git a/requirements/requirements-dev.txt b/requirements/requirements-dev.txt index 848bfd2..d3d60a8 100644 --- a/requirements/requirements-dev.txt +++ b/requirements/requirements-dev.txt @@ -6,13 +6,13 @@ # attrs==21.4.0 # via pytest -bandit==1.6.2 +bandit==1.7.4 # via -r requirements/requirements-dev.in certifi==2021.10.8 # via requests charset-normalizer==2.0.12 # via requests -click==8.0.4 +click==8.1.2 # via # flask # pip-tools @@ -54,7 +54,7 @@ flake8-logging-format==0.6.0 # via -r requirements/requirements-dev.in flake8-mutable==1.2.0 # via -r requirements/requirements-dev.in -flask==2.0.3 +flask==2.1.1 # via -r requirements/requirements.in gitdb==4.0.9 # via gitpython @@ -68,7 +68,7 @@ isort==5.10.1 # via flake8-isort itsdangerous==2.1.2 # via flask -jinja2==3.1.0 +jinja2==3.1.1 # via flask markdown==3.3.6 # via -r requirements/requirements.in @@ -86,9 +86,9 @@ pbr==5.8.1 # via stevedore pep517==0.12.0 # via pip-tools -pip-tools==6.5.1 +pip-tools==6.6.0 # via -r requirements/requirements-dev.in -platformdirs==2.5.1 +platformdirs==2.5.2 # via virtualenv pluggy==1.0.0 # via @@ -106,7 +106,7 @@ pydot==1.4.2 # via -r requirements/requirements-dev.in pyflakes==2.4.0 # via flake8 -pyparsing==3.0.7 +pyparsing==3.0.8 # via # packaging # pydot @@ -126,7 +126,6 @@ safety==1.10.3 # via -r requirements/requirements-dev.in six==1.16.0 # via - # bandit # tox # virtualenv smmap==5.0.0 @@ -146,7 +145,7 @@ tomli==2.0.1 # coverage # pep517 # pytest -tox==3.24.5 +tox==3.25.0 # via # -r requirements/requirements-dev.in # tox-wheel @@ -156,9 +155,9 @@ urllib3==1.26.9 # via requests versioneer==0.22 # via -r requirements/requirements-dev.in -virtualenv==20.13.4 +virtualenv==20.14.1 # via tox -werkzeug==2.0.3 +werkzeug==2.1.1 # via flask wheel==0.37.1 # via diff --git a/requirements/requirements.txt b/requirements/requirements.txt index 3a78229..c9b595b 100644 --- a/requirements/requirements.txt +++ b/requirements/requirements.txt @@ -4,17 +4,17 @@ # # pip-compile --output-file=requirements/requirements.txt requirements/requirements.in # -click==8.0.4 +click==8.1.2 # via flask -flask==2.0.3 +flask==2.1.1 # via -r requirements/requirements.in itsdangerous==2.1.2 # via flask -jinja2==3.1.0 +jinja2==3.1.1 # via flask markdown==3.3.6 # via -r requirements/requirements.in markupsafe==2.1.1 # via jinja2 -werkzeug==2.0.3 +werkzeug==2.1.1 # via flask diff --git a/tests/functional_tests.py b/tests/functional_tests.py index 168ef70..2b6a87f 100644 --- a/tests/functional_tests.py +++ b/tests/functional_tests.py @@ -134,32 +134,32 @@ def test_that_page_request_redirects_to_directory(client): """ response = client.get('/subdir') assert response.status_code == 301 - assert response.location == 'http://localhost/subdir/' + assert response.location == '/subdir/' def test_that_request_to_symlink_redirects_markdown(client): """Test that a request to /foo redirects to /what-foo-points-at.""" response = client.get('/symlink-to-no-title') assert response.status_code == 301 - assert response.location == 'http://localhost/no-title' + assert response.location == '/no-title' def test_that_request_to_symlink_redirects_file(client): """Test that a request to /foo.txt redirects to /what-foo-points-at.txt.""" response = client.get('/symlink-to-foo.txt') assert response.status_code == 301 - assert response.location == 'http://localhost/foo.txt' + assert response.location == '/foo.txt' def test_that_request_to_symlink_redirects_directory(client): """Test that a request to /foo/ redirects to /what-foo-points-at/.""" response = client.get('/symlink-to-subdir/') assert response.status_code == 301 - assert response.location == 'http://localhost/subdir' + assert response.location == '/subdir' # sadly, this location also redirects response = client.get('/subdir') assert response.status_code == 301 - assert response.location == 'http://localhost/subdir/' + assert response.location == '/subdir/' # but we do get there response = client.get('/subdir/') assert response.status_code == 200 @@ -169,7 +169,7 @@ def test_that_request_to_symlink_redirects_subdirectory(client): """Test that a request to /foo/bar redirects to /what-foo-points-at/bar.""" response = client.get('/symlink-to-subdir/page-no-title') assert response.status_code == 301 - assert response.location == 'http://localhost/subdir/page-no-title' + assert response.location == '/subdir/page-no-title' response = client.get('/subdir/page-no-title') assert response.status_code == 200