Fix further problems with middleware ordering

This commit is contained in:
Raphael Michel
2020-01-29 11:50:09 +01:00
parent a940fa9eb7
commit a28378bac9
3 changed files with 16 additions and 1 deletions

View File

@@ -27,6 +27,13 @@ def test_control_only_on_main_domain(env, client):
assert r['Location'] == 'http://example.com/control/login'
@pytest.mark.django_db
def test_append_slash(env, client):
r = client.get('/control')
assert r.status_code == 301
assert r['Location'] == '/control/'
@pytest.mark.django_db
def test_unknown_domain(env, client):
r = client.get('/control/login', HTTP_HOST='foobar')