From 5bcc1ed9df4e7a6b8086cac3f25a466aee3bebcd Mon Sep 17 00:00:00 2001 From: neodarz Date: Sat, 16 Jun 2018 17:52:31 +0200 Subject: Add first structure of the application --- src/tests/test_user.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/tests/test_user.py (limited to 'src/tests/test_user.py') 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 -- cgit v1.2.1