Spaces:
Running
Running
Mark Duppenthaler
Updated table. No more individual rows, separate tabs for leaderboard type, export tables
7f6ef8f
""" | |
This file contains shared pytest fixtures for all test files. | |
Fixtures defined here are automatically available to all test files. | |
""" | |
import pytest | |
import os | |
import sys | |
from flask import Flask | |
# Add the parent directory to sys.path to allow importing from the backend package | |
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) | |
# Import the Flask app for testing | |
from backend.app import app | |
def client(): | |
"""Create a test client for the Flask app.""" | |
app.config['TESTING'] = True | |
with app.test_client() as client: | |
yield client | |
def app_context(): | |
"""Create an application context for the Flask app.""" | |
with app.app_context(): | |
yield | |