diff options
Diffstat (limited to 'src/tests/test_user.py')
-rw-r--r-- | src/tests/test_user.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/tests/test_user.py b/src/tests/test_user.py new file mode 100644 index 0000000..3d7ab50 --- /dev/null +++ b/src/tests/test_user.py @@ -0,0 +1,15 @@ +import pytest, re + +from bson.json_util import dumps + +from lb_app.app_db.user import User + +def test_get_all_users(app): + with app.app_context(): + user = User(app) + assert re.search('username', dumps(user.all())) + +def test_register_user(app): + with app.app_context(): + user = User(app) + assert user.register("neodarz") is None |