aboutsummaryrefslogtreecommitdiff
path: root/app/tests/test_admin.py
diff options
context:
space:
mode:
Diffstat (limited to 'app/tests/test_admin.py')
-rw-r--r--app/tests/test_admin.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/app/tests/test_admin.py b/app/tests/test_admin.py
new file mode 100644
index 0000000..1a5df07
--- /dev/null
+++ b/app/tests/test_admin.py
@@ -0,0 +1,14 @@
+from app import database_cli
+
+def test_admin(app, client):
+ runner = app.test_cli_runner()
+ assert runner.invoke(database_cli,["admin-create"]).exit_code == 0
+
+ res = client.post("/signin",data=dict(
+ email=app.config["ADMIN_EMAIL"],
+ password=app.config["ADMIN_PASSWORD"]),follow_redirects=True)
+
+ print(res.data)
+ assert b"Supersu" in res.data
+ res = client.get("/admin/user/")
+ assert res.status_code == 200 \ No newline at end of file