mirror of
https://github.com/cssgunc/compass.git
synced 2025-04-09 14:00:15 -04:00
* Implement Resource service, tests, and test data with 97% coverage. * Update slug service to return empty list and corresponding tests * Update resource update tests to grab resource by id from the db to check
32 lines
889 B
Python
32 lines
889 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
|
|
from ...services import TagService
|
|
from ...services import ServiceService
|
|
from ...services import ResourceService
|
|
|
|
|
|
|
|
|
|
@pytest.fixture()
|
|
def user_svc(session: Session):
|
|
"""This fixture is used to test the UserService class"""
|
|
return UserService(session)
|
|
|
|
@pytest.fixture()
|
|
def tag_svc(session: Session):
|
|
"""This fixture is used to test the TagService class"""
|
|
return TagService(session)
|
|
|
|
@pytest.fixture()
|
|
def service_svc(session: Session):
|
|
"""This fixture is used to test the ServiceService class"""
|
|
return ServiceService(session)
|
|
|
|
@pytest.fixture()
|
|
def resource_svc(session: Session):
|
|
"""This fixture is used to test the ResourceService class"""
|
|
return ResourceService(session) |