mirror of
https://github.com/pretix/pretix.git
synced 2026-09-12 16:04:42 +00:00
Allow to set payment term per sales channel (#6459)
* Allow to set payment term per sales channel * Apply suggestion from @luelista Co-authored-by: luelista <weller@rami.io> --------- Co-authored-by: luelista <weller@rami.io>
This commit is contained in:
co-authored by
luelista
parent
91a3993cef
commit
58f331ba1f
@@ -286,6 +286,30 @@ def test_expiry_dst(event):
|
||||
assert (localex.hour, localex.minute) == (23, 59)
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
def test_expiry_per_channel(event):
|
||||
today = now()
|
||||
event.settings.set('payment_term_mode', 'minutes')
|
||||
event.settings.set('payment_term_minutes', 30)
|
||||
event.settings.set('payment_term_mode_baz', 'minutes')
|
||||
event.settings.set('payment_term_minutes_baz', 15)
|
||||
order = _create_order(event, email='dummy@example.org', positions=[],
|
||||
now_dt=today,
|
||||
sales_channel=event.organizer.sales_channels.get(identifier="baz"),
|
||||
payment_requests=[{
|
||||
"id": "test0",
|
||||
"provider": "free",
|
||||
"max_value": None,
|
||||
"min_value": None,
|
||||
"multi_use_supported": False,
|
||||
"info_data": {},
|
||||
"pprov": FreeOrderProvider(event),
|
||||
}],
|
||||
locale='de')[0]
|
||||
assert (order.expires - today).days == 0
|
||||
assert (order.expires - today).seconds == 15 * 60
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
def test_expiring(event):
|
||||
o1 = Order.objects.create(
|
||||
|
||||
Reference in New Issue
Block a user