fixed typos and added tests for db and auth
This commit is contained in:
+18
-1
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user