aboutsummaryrefslogtreecommitdiff
path: root/test_utils
diff options
context:
space:
mode:
authorstuppie2026-10-22 13:03:27 -0600
committerstuppie2026-10-22 13:03:27 -0600
commit64c251ceaf7ae2915f58b7f98e8ee7bbd27ed4e2 (patch)
tree11d58fe8a27e62542a61147534bb7caaec66facc /test_utils
parented4cf78c782d669aa554422f3cbbaf24361e1c8a (diff)
downloadgeneralresearch-64c251ceaf7ae2915f58b7f98e8ee7bbd27ed4e2.tar.gz
generalresearch-64c251ceaf7ae2915f58b7f98e8ee7bbd27ed4e2.zip
VI tests and fix a little bug
Diffstat (limited to 'test_utils')
-rw-r--r--test_utils/managers/conftest.py32
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 ===