kenken999's picture
sd
185f702
raw
history blame
294 Bytes
import pytest
from app.crud import CRUD
@pytest.fixture
def mock_crud(monkeypatch):
def mock_create_engine(*args, **kwargs):
return 'mock_engine'
monkeypatch.setattr('sqlalchemy.create_engine', mock_create_engine)
return CRUD('postgresql://user:password@localhost/dbname')