Skip to content

Commit 2cb6f09

Browse files
MyECLPay: Set a transaction date recent enough in tests (#755)
### Description Currently, tests are failing due to a transaction date that is too old in tests to initiate a refund
1 parent 898791a commit 2cb6f09

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

app/core/myeclpay/utils_myeclpay.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
hyperion_error_logger = logging.getLogger("hyperion.error")
2525

2626
LATEST_TOS = 2
27-
MAX_TRANSACTION_TOTAL = 2000
2827
QRCODE_EXPIRATION = 5 # minutes
2928
MYECLPAY_LOGS_S3_SUBFOLDER = "logs"
3029
RETENTION_DURATION = 10 * 365 # 10 years in days

tests/test_myeclpay.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,9 @@ async def init_objects() -> None:
268268
transaction_type=TransactionType.DIRECT,
269269
seller_user_id=ecl_user2.id,
270270
total=500, # 5€
271-
creation=datetime(2025, 5, 20, 12, 0, 0, tzinfo=UTC),
271+
# We want to set a date that is not before a month ago
272+
# to be able to test refunds
273+
creation=datetime.now(UTC) - timedelta(days=2),
272274
status=TransactionStatus.CONFIRMED,
273275
store_note="transaction_from_ecl_user_to_store",
274276
qr_code_id=None,

0 commit comments

Comments
 (0)