(db)
| 88 | |
| 89 | @pytest.fixture |
| 90 | def token(db): |
| 91 | token = Token( |
| 92 | user_id=1, |
| 93 | client_id="client-id", |
| 94 | token_type="bearer", |
| 95 | access_token="a1", |
| 96 | refresh_token="r1", |
| 97 | scope="profile", |
| 98 | expires_in=3600, |
| 99 | ) |
| 100 | db.session.add(token) |
| 101 | db.session.commit() |
| 102 | yield token |
| 103 | db.session.delete(token) |