"""Tests for Product Store Pricing logic.""" from unittest.mock import MagicMock from oto import response from pricing.logic import product_store_effective_price_code from pricing.models import product_store_effective_price_code as model import pytest @pytest.fixture def fixture_response(): """Fixture for a store pricing scheme response.""" return response.Response({ 'items': [] }) def test_get_by_product_id(monkeypatch, fixture_response): """Test that it will return a response.""" monkeypatch.setattr( model, 'get_by_product_id', MagicMock(return_value=fixture_response)) product_id = '1' result = product_store_effective_price_code.get_by_product_id(product_id) assert result.status == 200