Implement CSRF

This commit is contained in:
2022-07-10 20:32:29 +01:00
parent c7ead8d4fd
commit 3ad51ee1a3
5 changed files with 15 additions and 3 deletions

View File

@ -2,13 +2,16 @@
"""PyTest unit tests."""
import os
import pytest
from app.app import app
from app.app import app, csrf
@pytest.fixture
def client():
"""Set up Flask client for use in tests."""
app.secret_key = os.urandom(12).hex()
csrf.init_app(app)
client = app.test_client()
yield client