Fix code smell: mock web client
This commit is contained in:
@ -13,5 +13,5 @@ def client():
|
|||||||
"""Set up Flask client for use in tests."""
|
"""Set up Flask client for use in tests."""
|
||||||
app.secret_key = os.urandom(12).hex()
|
app.secret_key = os.urandom(12).hex()
|
||||||
csrf.init_app(app)
|
csrf.init_app(app)
|
||||||
client = app.test_client()
|
web_client = app.test_client()
|
||||||
yield client
|
yield web_client
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
"""Tests for app/app.py"""
|
"""Tests for app/app.py"""
|
||||||
|
|
||||||
|
|
||||||
from tests import client
|
from tests import client # pragma: no cover
|
||||||
|
|
||||||
|
|
||||||
def test_index(client) -> None:
|
def test_index(client) -> None:
|
||||||
|
Reference in New Issue
Block a user