auth_required: allow formattable template tuples

See docstring for updates.

template= has been modified.
status_code= has been added as an optional template status_code.

Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
Kevin Morris 2021-06-21 21:35:05 -07:00
parent d7941e6bed
commit af76e660d0
3 changed files with 70 additions and 14 deletions

View file

@ -915,7 +915,6 @@ def test_get_account_not_found():
def test_get_account_unauthenticated():
with client as request:
response = request.get("/account/test", allow_redirects=False)
assert response.status_code == int(HTTPStatus.UNAUTHORIZED)
content = response.content.decode()