Feature/01 test all the things

This commit is contained in:
2022-03-14 15:41:45 +00:00
parent bfe4a0af89
commit 4ca4233892
9 changed files with 324 additions and 52 deletions

View File

@ -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")