diff options
| author | Greg Stupp | 2026-10-23 03:20:59 +0000 |
|---|---|---|
| committer | Greg Stupp | 2026-10-23 03:20:59 +0000 |
| commit | af5c3e97a8afb31f5219d4cdd9d752b7f2b2aa3b (patch) | |
| tree | cd182fdd65de736cb9c93a59bc40f1e1e2360dde /test_utils/managers/conftest.py | |
| parent | 292860a9569e08f9f58c49802ee1f25cd39f9be1 (diff) | |
| parent | 45d66cd40d409a8a05c8dde7193f1e8469058fff (diff) | |
| download | generalresearch-e235af0bfa42969637f2237bfe06bdebae5b7d16.tar.gz generalresearch-e235af0bfa42969637f2237bfe06bdebae5b7d16.zip | |
virtual incentives and BrokerageProductLedgerTransaction
Diffstat (limited to 'test_utils/managers/conftest.py')
| -rw-r--r-- | test_utils/managers/conftest.py | 32 |
1 files changed, 29 insertions, 3 deletions
diff --git a/test_utils/managers/conftest.py b/test_utils/managers/conftest.py index a9f92a2..d78332e 100644 --- a/test_utils/managers/conftest.py +++ b/test_utils/managers/conftest.py @@ -31,6 +31,7 @@ from generalresearch.models.definitions import Source from generalresearch.models.thl.wallet.cashout_method import ( CashoutMethod, TangoCashoutMethodData, + VICashoutMethodData, ) from generalresearch.models.thl.wallet.definitions import Currency, PayoutType @@ -177,12 +178,13 @@ def setup_cashoutmethod_db( cashout_method_manager: CashoutMethodManager, delete_cashoutmethod_db: Callable[..., None], example_tango_cashout_methods: list[CashoutMethod], + example_vi_cashout_methods: list[CashoutMethod], ) -> Callable[..., None]: def _inner(): delete_cashoutmethod_db() - for x in example_tango_cashout_methods: + for x in example_tango_cashout_methods + example_vi_cashout_methods: cashout_method_manager.create(x) return _inner @@ -199,8 +201,7 @@ def random_ext_id_factory(base: str = "U02") -> Callable[..., str]: @pytest.fixture(scope="session") -def example_tango_cashout_methods( -) -> list[CashoutMethod]: +def example_tango_cashout_methods() -> list[CashoutMethod]: return [ CashoutMethod( id=uuid4().hex, @@ -237,6 +238,31 @@ def example_tango_cashout_methods( ] +@pytest.fixture(scope="session") +def example_vi_cashout_methods() -> list[CashoutMethod]: + return [ + CashoutMethod( + id=uuid4().hex, + type=PayoutType.VIRTUAL_INCENTIVES, + ext_id="AMAZON-US", + name="Amazon.com Gift Card", + description="Amazon.com Gift Card", + data=VICashoutMethodData( + sku="AMAZON-US", + value_type="variable", + marketing="Amazon marketing copy", + terms="Amazon terms", + ), + user=None, + image_url="https://example.com/amazon.png", + currency=Currency.USD, + original_currency=Currency.USD, + min_value=500, + max_value=25_000, + ) + ] + + # === THL: Marketplaces === |
