Skip to content

Commit 0b6476f

Browse files
committed
refactor: 불필요하게 shop 패키지 root에 있는 mock 제거
1 parent 38eafe5 commit 0b6476f

3 files changed

Lines changed: 10 additions & 9 deletions

File tree

app/admin_api/test/shop/conftest.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,9 @@
88
donation_product,
99
donation_refunded_order,
1010
empty_cart,
11-
mock_portone_find_payment_info,
1211
mock_portone_kcp_receipt,
1312
mock_portone_register,
1413
mock_portone_req_cancel_payment,
15-
mocked_on_commit,
1614
modifiable_option_relation,
1715
option,
1816
option_group,

app/shop/conftest.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -283,10 +283,3 @@ def mock_portone_kcp_receipt():
283283
"""`portone_client.get_kcp_receipt_search_data` 를 mock — 영수증 페이지 redirect 데이터 주입."""
284284
with patch.object(portone_client, "get_kcp_receipt_search_data") as mocked:
285285
yield mocked
286-
287-
288-
@pytest.fixture
289-
def mocked_on_commit():
290-
# test transaction 은 rollback 되므로 on_commit callback 이 실제로 fire 안 됨 — 등록만 검증.
291-
with patch("shop.payment_history.serializers.transaction.on_commit") as mocked:
292-
yield mocked
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
from unittest.mock import patch
2+
3+
import pytest
4+
5+
6+
@pytest.fixture
7+
def mocked_on_commit():
8+
# test transaction 은 rollback 되므로 on_commit callback 이 실제로 fire 안 됨 — 등록만 검증.
9+
with patch("shop.payment_history.serializers.transaction.on_commit") as mocked:
10+
yield mocked

0 commit comments

Comments
 (0)