mirror of
https://github.com/cssgunc/compass.git
synced 2025-04-09 22:00:18 -04:00
25 lines
740 B
Python
25 lines
740 B
Python
"""Fixtures used for testing the core services."""
|
|
|
|
import pytest
|
|
from unittest.mock import create_autospec
|
|
from sqlalchemy.orm import Session
|
|
from ...services import UserService, TagService, ServiceService, ResourceService
|
|
|
|
|
|
@pytest.fixture()
|
|
def user_svc(session: Session):
|
|
"""This fixture is used to test the UserService class"""
|
|
return UserService(session)
|
|
|
|
|
|
@pytest.fixture()
|
|
def service_svc(session: Session, tag_svc: TagService):
|
|
"""This fixture is used to test the ServiceService class"""
|
|
return ServiceService(session, tag_svc)
|
|
|
|
|
|
@pytest.fixture()
|
|
def resource_svc(session: Session, tag_svc: TagService):
|
|
"""This fixutre is used to test the ResourceService class"""
|
|
return ResourceService(session, tag_svc)
|