import pytest
from unittest.mock import patch, MagicMock
from sut.backend.services.shop_service import ShopService

# Example test for ShopService using AAA and mocking

def test_list_available_items_returns_list():
    # Arrange
    class DummyItem:
        def to_public_dict(self):
            return {"id": 1, "name": "Test Item"}

    class DummyQuery:
        def filter(self, *args, **kwargs):
            return self
        def order_by(self, *args, **kwargs):
            return self
        def all(self):
            return [DummyItem()]

    dummy_query = DummyQuery()
    # Act
    result = ShopService.list_available_items(query_obj=dummy_query)
    # Assert
    assert isinstance(result, list)
    assert result == [{"id": 1, "name": "Test Item"}]
