This repository has been archived on 2024-07-19. You can view files and clone it, but cannot push or open issues or pull requests.
rotini/backend/tests/conftest.py

17 lines
363 B
Python
Raw Normal View History

from fastapi.testclient import TestClient
import pytest
from rotini.main import app
from rotini.db import get_connection
@pytest.fixture(name="client")
def fixture_client():
return TestClient(app)
@pytest.fixture(autouse=True)
def reset_database():
with get_connection() as conn, conn.cursor() as cursor:
cursor.execute("DELETE FROM files;")