Arch/tests/helpers.py

16 lines
347 B
Python
Raw Normal View History

2025-03-04 06:38:19 -03:00
"""Helper functions for tests."""
import os
def ensure_clean_session(client):
"""Ensure we have a clean session before each test."""
# Get the root URL to reset application state
with client.session_transaction() as session:
session.clear()
# Make a request to reset client state
client.get("/")
return client