Feature/01 test all the things
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
import pytest
|
||||
import base64
|
||||
from jail2ban import create_app
|
||||
|
||||
|
||||
@ -8,7 +9,7 @@ def app():
|
||||
app.config.update({
|
||||
"TESTING": True,
|
||||
"SECRET_KEY": 'Testing',
|
||||
"AUTHFILE": 'tests/users-test.txt'
|
||||
"AUTHFILE": '../tests/users-test.txt'
|
||||
})
|
||||
|
||||
# other setup can go here
|
||||
@ -26,3 +27,8 @@ def client(app):
|
||||
@pytest.fixture()
|
||||
def runner(app):
|
||||
return app.test_cli_runner()
|
||||
|
||||
|
||||
@pytest.fixture()
|
||||
def valid_credentials():
|
||||
return base64.b64encode(b"test.example.com:testpassword").decode("utf-8")
|
||||
|
||||
Reference in New Issue
Block a user