-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Martin Bähr
committed
May 24, 2024
1 parent
ebf51e0
commit 106db31
Showing
19 changed files
with
73 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,16 +10,15 @@ class LocaleDeterminationTest(TestCase): | |
This test case tests various methods around the properties / | ||
variations concept. | ||
""" | ||
@classmethod | ||
def setUpTestData(cls): | ||
def setUp(self): | ||
o = Organizer.objects.create(name='Dummy', slug='dummy') | ||
cls.event = Event.objects.create( | ||
self.event = Event.objects.create( | ||
organizer=o, name='Dummy', slug='dummy', | ||
date_from=now(), live=True | ||
) | ||
cls.TEST_LOCALE = 'de' if settings.LANGUAGE_CODE == 'en' else 'en' | ||
cls.TEST_LOCALE_LONG = 'de-AT' if settings.LANGUAGE_CODE == 'en' else 'en-NZ' | ||
cls.user = User.objects.create_user('[email protected]', 'dummy') | ||
self.TEST_LOCALE = 'de' if settings.LANGUAGE_CODE == 'en' else 'en' | ||
self.TEST_LOCALE_LONG = 'de-AT' if settings.LANGUAGE_CODE == 'en' else 'en-NZ' | ||
self.user = User.objects.create_user('[email protected]', 'dummy') | ||
|
||
def test_global_default(self): | ||
c = Client() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2556,6 +2556,9 @@ def test_autocheckin(clist_autocheckin, event): | |
clist_autocheckin.auto_checkin_sales_channels = [] | ||
clist_autocheckin.save() | ||
|
||
cp1 = CartPosition.objects.create( | ||
item=ticket, price=23, expires=now() + timedelta(days=1), event=event, cart_id="123" | ||
) | ||
order = _create_order(event, email='[email protected]', positions=[cp1], | ||
now_dt=today, payment_provider=FreeOrderProvider(event), | ||
locale='de')[0] | ||
|
@@ -2578,17 +2581,26 @@ def test_saleschannel_testmode_restriction(event): | |
locale='de', sales_channel='web')[0] | ||
assert not order.testmode | ||
|
||
cp1 = CartPosition.objects.create( | ||
item=ticket, price=23, expires=now() + timedelta(days=1), event=event, cart_id="123" | ||
) | ||
order = _create_order(event, email='[email protected]', positions=[cp1], | ||
now_dt=today, payment_provider=FreeOrderProvider(event), | ||
locale='de', sales_channel=FoobazSalesChannel.identifier)[0] | ||
assert not order.testmode | ||
|
||
event.testmode = True | ||
cp1 = CartPosition.objects.create( | ||
item=ticket, price=23, expires=now() + timedelta(days=1), event=event, cart_id="123" | ||
) | ||
order = _create_order(event, email='[email protected]', positions=[cp1], | ||
now_dt=today, payment_provider=FreeOrderProvider(event), | ||
locale='de', sales_channel='web')[0] | ||
assert order.testmode | ||
|
||
cp1 = CartPosition.objects.create( | ||
item=ticket, price=23, expires=now() + timedelta(days=1), event=event, cart_id="123" | ||
) | ||
order = _create_order(event, email='[email protected]', positions=[cp1], | ||
now_dt=today, payment_provider=FreeOrderProvider(event), | ||
locale='de', sales_channel=FoobazSalesChannel.identifier)[0] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.