15 lines
312 B
Python
15 lines
312 B
Python
import pytest
|
|
from fooder.context import Context
|
|
from fooder.repository import Repository
|
|
|
|
|
|
@pytest.fixture
|
|
def ctx(db_session):
|
|
return Context(repo=Repository(db_session))
|
|
|
|
|
|
@pytest.fixture
|
|
def auth_ctx(db_session, user):
|
|
ctx = Context(repo=Repository(db_session))
|
|
ctx.set_user(user)
|
|
return ctx
|