summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorTom Harley2021-07-06 18:30:31 +0000
committerTom Harley2021-07-06 18:30:31 +0000
commit0a0007dee01f2bf17371967105a6ab3c43f85550 (patch)
tree9e01b8fa0f677a6bcd650afbb022c67a53ef3b4b /tests
parentAdd nixfmt to project (diff)
downloadswap-0a0007dee01f2bf17371967105a6ab3c43f85550.tar.gz
swap-0a0007dee01f2bf17371967105a6ab3c43f85550.zip

Begin work on adding user interaction

This commit adds support for getting information about a user, as well as accessing their inbox (not actually getting a CollectionPage yet, though).

Currently the inbox does not require the right user to be logged in to access their personal inbox; this should be fixed.

Diffstat (limited to 'tests')
-rw-r--r--tests/data.sql2
-rw-r--r--tests/test_auth.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/data.sql b/tests/data.sql
index 4579284..eb1f36e 100644
--- a/tests/data.sql
+++ b/tests/data.sql
@@ -1,4 +1,4 @@
-insert into user (username, password)
+insert into users (username, password)
values
('test', 'pbkdf2:sha256:50000$TCI4GzcX$0de171a4f4dac32e3364c7ddc7c14f3e2fa61f2d17574483f7ffbb431b4acb2f'),
('other', 'pbkdf2:sha256:50000$kJPKsz6N$d2d4784f1b030a9761f5ccaeeaca413f27f2ecb76d6168407af962ddce849f79');
diff --git a/tests/test_auth.py b/tests/test_auth.py
index 3fb2493..067746d 100644
--- a/tests/test_auth.py
+++ b/tests/test_auth.py
@@ -16,7 +16,7 @@ def test_register(client, app):
with app.app_context():
db_result = (
- get_db().execute("select * from user where username='a'",).fetchone()
+ get_db().execute("select * from users where username='a'",).fetchone()
)
assert db_result is not None