File size: 294 Bytes
185f702
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
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')