Browse Source

do a requirements bump

notable changes:

* Flask 1.1 treats redirects to itself as relative URLs now, so a spate
  of tests were updated
speculative-style-simplification v1.8.0
Brian S. Stephan 2 months ago
parent
commit
985bb93839
Signed by: bss
GPG Key ID: 3DE06D3180895FCB
  1. 2
      requirements/requirements-dev.in
  2. 21
      requirements/requirements-dev.txt
  3. 8
      requirements/requirements.txt
  4. 12
      tests/functional_tests.py

2
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

21
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

8
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

12
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

Loading…
Cancel
Save