blob: ae20f2b1a837c3b0c9d511121e440ed397c42138 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
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
|