do a requirements bump
notable changes: * Flask 1.1 treats redirects to itself as relative URLs now, so a spate of tests were updated
This commit is contained in:
parent
3454de17fc
commit
985bb93839
@ -6,7 +6,7 @@ pytest
|
|||||||
pytest-cov
|
pytest-cov
|
||||||
|
|
||||||
# linting and other static code analysis
|
# linting and other static code analysis
|
||||||
bandit==1.6.2 # pinned because 1.7.0 wasn't running right in tox
|
bandit
|
||||||
dlint
|
dlint
|
||||||
flake8
|
flake8
|
||||||
flake8-blind-except
|
flake8-blind-except
|
||||||
|
@ -6,13 +6,13 @@
|
|||||||
#
|
#
|
||||||
attrs==21.4.0
|
attrs==21.4.0
|
||||||
# via pytest
|
# via pytest
|
||||||
bandit==1.6.2
|
bandit==1.7.4
|
||||||
# via -r requirements/requirements-dev.in
|
# via -r requirements/requirements-dev.in
|
||||||
certifi==2021.10.8
|
certifi==2021.10.8
|
||||||
# via requests
|
# via requests
|
||||||
charset-normalizer==2.0.12
|
charset-normalizer==2.0.12
|
||||||
# via requests
|
# via requests
|
||||||
click==8.0.4
|
click==8.1.2
|
||||||
# via
|
# via
|
||||||
# flask
|
# flask
|
||||||
# pip-tools
|
# pip-tools
|
||||||
@ -54,7 +54,7 @@ flake8-logging-format==0.6.0
|
|||||||
# via -r requirements/requirements-dev.in
|
# via -r requirements/requirements-dev.in
|
||||||
flake8-mutable==1.2.0
|
flake8-mutable==1.2.0
|
||||||
# via -r requirements/requirements-dev.in
|
# via -r requirements/requirements-dev.in
|
||||||
flask==2.0.3
|
flask==2.1.1
|
||||||
# via -r requirements/requirements.in
|
# via -r requirements/requirements.in
|
||||||
gitdb==4.0.9
|
gitdb==4.0.9
|
||||||
# via gitpython
|
# via gitpython
|
||||||
@ -68,7 +68,7 @@ isort==5.10.1
|
|||||||
# via flake8-isort
|
# via flake8-isort
|
||||||
itsdangerous==2.1.2
|
itsdangerous==2.1.2
|
||||||
# via flask
|
# via flask
|
||||||
jinja2==3.1.0
|
jinja2==3.1.1
|
||||||
# via flask
|
# via flask
|
||||||
markdown==3.3.6
|
markdown==3.3.6
|
||||||
# via -r requirements/requirements.in
|
# via -r requirements/requirements.in
|
||||||
@ -86,9 +86,9 @@ pbr==5.8.1
|
|||||||
# via stevedore
|
# via stevedore
|
||||||
pep517==0.12.0
|
pep517==0.12.0
|
||||||
# via pip-tools
|
# via pip-tools
|
||||||
pip-tools==6.5.1
|
pip-tools==6.6.0
|
||||||
# via -r requirements/requirements-dev.in
|
# via -r requirements/requirements-dev.in
|
||||||
platformdirs==2.5.1
|
platformdirs==2.5.2
|
||||||
# via virtualenv
|
# via virtualenv
|
||||||
pluggy==1.0.0
|
pluggy==1.0.0
|
||||||
# via
|
# via
|
||||||
@ -106,7 +106,7 @@ pydot==1.4.2
|
|||||||
# via -r requirements/requirements-dev.in
|
# via -r requirements/requirements-dev.in
|
||||||
pyflakes==2.4.0
|
pyflakes==2.4.0
|
||||||
# via flake8
|
# via flake8
|
||||||
pyparsing==3.0.7
|
pyparsing==3.0.8
|
||||||
# via
|
# via
|
||||||
# packaging
|
# packaging
|
||||||
# pydot
|
# pydot
|
||||||
@ -126,7 +126,6 @@ safety==1.10.3
|
|||||||
# via -r requirements/requirements-dev.in
|
# via -r requirements/requirements-dev.in
|
||||||
six==1.16.0
|
six==1.16.0
|
||||||
# via
|
# via
|
||||||
# bandit
|
|
||||||
# tox
|
# tox
|
||||||
# virtualenv
|
# virtualenv
|
||||||
smmap==5.0.0
|
smmap==5.0.0
|
||||||
@ -146,7 +145,7 @@ tomli==2.0.1
|
|||||||
# coverage
|
# coverage
|
||||||
# pep517
|
# pep517
|
||||||
# pytest
|
# pytest
|
||||||
tox==3.24.5
|
tox==3.25.0
|
||||||
# via
|
# via
|
||||||
# -r requirements/requirements-dev.in
|
# -r requirements/requirements-dev.in
|
||||||
# tox-wheel
|
# tox-wheel
|
||||||
@ -156,9 +155,9 @@ urllib3==1.26.9
|
|||||||
# via requests
|
# via requests
|
||||||
versioneer==0.22
|
versioneer==0.22
|
||||||
# via -r requirements/requirements-dev.in
|
# via -r requirements/requirements-dev.in
|
||||||
virtualenv==20.13.4
|
virtualenv==20.14.1
|
||||||
# via tox
|
# via tox
|
||||||
werkzeug==2.0.3
|
werkzeug==2.1.1
|
||||||
# via flask
|
# via flask
|
||||||
wheel==0.37.1
|
wheel==0.37.1
|
||||||
# via
|
# via
|
||||||
|
@ -4,17 +4,17 @@
|
|||||||
#
|
#
|
||||||
# pip-compile --output-file=requirements/requirements.txt requirements/requirements.in
|
# pip-compile --output-file=requirements/requirements.txt requirements/requirements.in
|
||||||
#
|
#
|
||||||
click==8.0.4
|
click==8.1.2
|
||||||
# via flask
|
# via flask
|
||||||
flask==2.0.3
|
flask==2.1.1
|
||||||
# via -r requirements/requirements.in
|
# via -r requirements/requirements.in
|
||||||
itsdangerous==2.1.2
|
itsdangerous==2.1.2
|
||||||
# via flask
|
# via flask
|
||||||
jinja2==3.1.0
|
jinja2==3.1.1
|
||||||
# via flask
|
# via flask
|
||||||
markdown==3.3.6
|
markdown==3.3.6
|
||||||
# via -r requirements/requirements.in
|
# via -r requirements/requirements.in
|
||||||
markupsafe==2.1.1
|
markupsafe==2.1.1
|
||||||
# via jinja2
|
# via jinja2
|
||||||
werkzeug==2.0.3
|
werkzeug==2.1.1
|
||||||
# via flask
|
# via flask
|
||||||
|
@ -134,32 +134,32 @@ def test_that_page_request_redirects_to_directory(client):
|
|||||||
"""
|
"""
|
||||||
response = client.get('/subdir')
|
response = client.get('/subdir')
|
||||||
assert response.status_code == 301
|
assert response.status_code == 301
|
||||||
assert response.location == 'http://localhost/subdir/'
|
assert response.location == '/subdir/'
|
||||||
|
|
||||||
|
|
||||||
def test_that_request_to_symlink_redirects_markdown(client):
|
def test_that_request_to_symlink_redirects_markdown(client):
|
||||||
"""Test that a request to /foo redirects to /what-foo-points-at."""
|
"""Test that a request to /foo redirects to /what-foo-points-at."""
|
||||||
response = client.get('/symlink-to-no-title')
|
response = client.get('/symlink-to-no-title')
|
||||||
assert response.status_code == 301
|
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):
|
def test_that_request_to_symlink_redirects_file(client):
|
||||||
"""Test that a request to /foo.txt redirects to /what-foo-points-at.txt."""
|
"""Test that a request to /foo.txt redirects to /what-foo-points-at.txt."""
|
||||||
response = client.get('/symlink-to-foo.txt')
|
response = client.get('/symlink-to-foo.txt')
|
||||||
assert response.status_code == 301
|
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):
|
def test_that_request_to_symlink_redirects_directory(client):
|
||||||
"""Test that a request to /foo/ redirects to /what-foo-points-at/."""
|
"""Test that a request to /foo/ redirects to /what-foo-points-at/."""
|
||||||
response = client.get('/symlink-to-subdir/')
|
response = client.get('/symlink-to-subdir/')
|
||||||
assert response.status_code == 301
|
assert response.status_code == 301
|
||||||
assert response.location == 'http://localhost/subdir'
|
assert response.location == '/subdir'
|
||||||
# sadly, this location also redirects
|
# sadly, this location also redirects
|
||||||
response = client.get('/subdir')
|
response = client.get('/subdir')
|
||||||
assert response.status_code == 301
|
assert response.status_code == 301
|
||||||
assert response.location == 'http://localhost/subdir/'
|
assert response.location == '/subdir/'
|
||||||
# but we do get there
|
# but we do get there
|
||||||
response = client.get('/subdir/')
|
response = client.get('/subdir/')
|
||||||
assert response.status_code == 200
|
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."""
|
"""Test that a request to /foo/bar redirects to /what-foo-points-at/bar."""
|
||||||
response = client.get('/symlink-to-subdir/page-no-title')
|
response = client.get('/symlink-to-subdir/page-no-title')
|
||||||
assert response.status_code == 301
|
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')
|
response = client.get('/subdir/page-no-title')
|
||||||
assert response.status_code == 200
|
assert response.status_code == 200
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user