mirror of
https://github.com/pretix/pretix.git
synced 2026-05-04 15:04:03 +00:00
Order import: Allow to assign a customer
This commit is contained in:
@@ -308,6 +308,25 @@ def test_import_attendee_email(user, event, item):
|
||||
assert OrderPosition.objects.filter(attendee_email__isnull=True).count() == 1
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
@scopes_disabled()
|
||||
def test_import_customer(user, event, item):
|
||||
event.organizer.settings.customer_accounts = True
|
||||
settings = dict(DEFAULT_SETTINGS)
|
||||
settings['item'] = 'static:{}'.format(item.pk)
|
||||
settings['customer'] = 'csv:C'
|
||||
c = event.organizer.customers.create(
|
||||
email="daniel@example.org",
|
||||
)
|
||||
event.organizer.customers.create(
|
||||
email="schneider@example.org",
|
||||
)
|
||||
import_orders.apply(
|
||||
args=(event.pk, inputfile_factory().id, settings, 'en', user.pk)
|
||||
)
|
||||
assert c.orders.count() == 1
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
@scopes_disabled()
|
||||
def test_import_attendee_email_invalid(user, event, item):
|
||||
|
||||
Reference in New Issue
Block a user