lint fixes (tests)

This commit is contained in:
2024-07-31 16:30:43 +02:00
parent 63c8e39b59
commit f7cc4d9d4e
5 changed files with 80 additions and 10 deletions

View File

@ -1,5 +1,10 @@
import pytest
'''
Test fixtures
'''
import base64
import pytest
from jail2ban import create_app
@ -21,14 +26,23 @@ def app():
@pytest.fixture()
def client(app):
'''
Create a synthetic client
'''
return app.test_client()
@pytest.fixture()
def runner(app):
'''
Create a synthetic runner
'''
return app.test_cli_runner()
@pytest.fixture()
def valid_credentials():
'''
Mock authentication for the test
'''
return base64.b64encode(b"test.example.com:testpassword").decode("utf-8")