Commit 0efa5a78 authored by Aryan Noshirvani's avatar Aryan Noshirvani

Fix database import in pytest conftest

parent 6dcc1462
import pytest import pytest
from fastapi.testclient import TestClient from fastapi.testclient import TestClient
from src.api.main import app from src.api.main import app
from src.core.database import SessionLocal, Base, engine try:
from database import engine, Base
except ImportError:
from src.core.database import engine, Base
@pytest.fixture(scope="session", autouse=True) @pytest.fixture(scope="session", autouse=True)
def setup_database(): def setup_database():
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment