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
Marc Cataford ee9a9d8dc3
test(backend): list+details tests (#12)
* build(backend): more verbosity on test + error handling

* fix(backend): raise HTTPException, not return on details fetch

* fix(backend): get inserted ID instead of row tuple

* test(backend): add tests for list + details routes
2023-08-12 13:24:25 -04:00

16 lines
363 B
Python

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;")