fixed typos and added tests for db and auth

This commit is contained in:
2021-10-11 22:14:06 -06:00
parent dffc3e983d
commit 30b21dbde6
3 changed files with 71 additions and 1 deletions
+18 -1
View File
@@ -32,4 +32,21 @@ def client(app):
@pytest.fixture
def runner(app):
return app.test_client()
return app.test_cli_runner()
class AuthActions(object):
def __init__(self, client):
self._client = client
def login(self, username='test', password='test'):
return self._client.post(
'auth/login',
data={'username': username, 'password': password}
)
def logout(self):
return self._client.get('auth/logout')
@pytest.fixture
def auth(client):
return AuthActions(client)