diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2021-11-02 18:13:14 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2021-11-02 18:13:14 -0700 |
commit | cdfd6b85b386b7bbf9d5a5179ef26970b6e5a4e7 (patch) | |
tree | 5e4034027b51f3ee4d2a488bb2cbb7a75c3bd0d8 /python/tests/web_editor.py | |
parent | 78f08280edea4ff65ca613ad30005c45cc48dea6 (diff) | |
download | fatcat-cdfd6b85b386b7bbf9d5a5179ef26970b6e5a4e7.tar.gz fatcat-cdfd6b85b386b7bbf9d5a5179ef26970b6e5a4e7.zip |
fmt (black): tests/
Diffstat (limited to 'python/tests/web_editor.py')
-rw-r--r-- | python/tests/web_editor.py | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/python/tests/web_editor.py b/python/tests/web_editor.py index 0d0679bb..b7c249ba 100644 --- a/python/tests/web_editor.py +++ b/python/tests/web_editor.py @@ -1,32 +1,35 @@ - from fixtures import * def test_change_username(app_admin): # these tests aren't supposed to mutate database - rv = app_admin.post('/auth/change_username', data={'username': 'admin-tmp'}, - follow_redirects=True) + rv = app_admin.post( + "/auth/change_username", data={"username": "admin-tmp"}, follow_redirects=True + ) assert rv.status_code == 200 - rv = app_admin.get('/auth/account') - assert b'admin-tmp' in rv.data + rv = app_admin.get("/auth/account") + assert b"admin-tmp" in rv.data - rv = app_admin.post('/auth/change_username', data={'username': 'claire'}, - follow_redirects=True) + rv = app_admin.post( + "/auth/change_username", data={"username": "claire"}, follow_redirects=True + ) assert rv.status_code == 400 - rv = app_admin.get('/auth/account') - assert b'admin-tmp' in rv.data + rv = app_admin.get("/auth/account") + assert b"admin-tmp" in rv.data - rv = app_admin.post('/auth/change_username', data={'username': 'admin'}, - follow_redirects=True) + rv = app_admin.post( + "/auth/change_username", data={"username": "admin"}, follow_redirects=True + ) assert rv.status_code == 200 - rv = app_admin.get('/auth/account') - assert b'admin-tmp' not in rv.data + 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') + rv = app_admin.get("/u/admin") assert rv.status_code == 302 - rv = app_admin.get('/u/bogus-not-registered') + rv = app_admin.get("/u/bogus-not-registered") assert rv.status_code == 404 |