mirror of
https://github.com/fergalmoran/bitchmin.git
synced 2026-02-15 12:24:05 +00:00
15 lines
392 B
Python
15 lines
392 B
Python
from datetime import timedelta
|
|
|
|
from app.models import User
|
|
|
|
|
|
class TestUserRoutes:
|
|
|
|
def test_user_get(self, db, app) -> None:
|
|
client = app.test_client()
|
|
user = db.session.query(User).first()
|
|
token = user.create_token(timedelta(seconds=60))
|
|
|
|
rv = client.get(f"/user", headers={"Authorization": "Bearer {}".format(token)})
|
|
assert "200" in rv.status
|