update tests for relative redirects
This commit is contained in:
parent
ce7b884b73
commit
81c7ff7f8d
6 changed files with 20 additions and 9 deletions
|
|
@ -19,7 +19,7 @@ def test_index(client, auth):
|
|||
@pytest.mark.parametrize("path", ("/create", "/1/update", "/1/delete"))
|
||||
def test_login_required(client, path):
|
||||
response = client.post(path)
|
||||
assert response.headers["Location"] == "http://localhost/auth/login"
|
||||
assert response.headers["Location"] == "/auth/login"
|
||||
|
||||
|
||||
def test_author_required(app, client, auth):
|
||||
|
|
@ -75,7 +75,7 @@ def test_create_update_validate(client, auth, path):
|
|||
def test_delete(client, auth, app):
|
||||
auth.login()
|
||||
response = client.post("/1/delete")
|
||||
assert response.headers["Location"] == "http://localhost/"
|
||||
assert response.headers["Location"] == "/"
|
||||
|
||||
with app.app_context():
|
||||
db = get_db()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue