From b9d2e62d9253af5bdafeef77f242682c0a951184 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Wed, 13 Oct 2021 16:46:23 -0700 Subject: web: editor username /u/ helper --- python/tests/web_editor.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'python/tests/web_editor.py') diff --git a/python/tests/web_editor.py b/python/tests/web_editor.py index 58b21ddf..0d0679bb 100644 --- a/python/tests/web_editor.py +++ b/python/tests/web_editor.py @@ -22,3 +22,11 @@ def test_change_username(app_admin): assert rv.status_code == 200 rv = app_admin.get('/auth/account') assert b'admin-tmp' not in rv.data + +def test_username_redirect(app_admin): + + rv = app_admin.get('/u/admin') + assert rv.status_code == 302 + + rv = app_admin.get('/u/bogus-not-registered') + assert rv.status_code == 404 -- cgit v1.2.3