compass/backend/test/services/fixtures.py
Emma Foster 99e43c7b30
Resource Service and Tests (#41)
* 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
2024-11-04 15:10:58 -05:00

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)