-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement organizer onboarding process | Validate condition to public…
… Event (#429) * Implement billing settings form for organizer * Fix flake8 in pipeline * implement create and save payment_information * Fix isort, flake8 in pipeline * implement payment-information-v1 * src/pretix/control/views/organizer_views/organizer_view.py * Code refactoring * Code refactoring * Remove payment_information attribute * Implement tax validation * Update code * Update code * Fix flake8 in pipeline * Add pyvat package * Fix flake8 in pipeline * Latest code * Fix flake8 in pipeline * Add logger error * Fix flake8 in pipeline * Fix conflict pretix base migration * Update pretix base migration * Add logging information and modify error logging * Add comment,save tax_id, show error and sucess message * Validate to public Event * fix UT --------- Co-authored-by: odkhang <[email protected]>
- Loading branch information
Showing
4 changed files
with
60 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ | |
|
||
from pretix.base.models import Device, Event, Organizer, Team, User | ||
from pretix.base.models.devices import generate_api_token | ||
from pretix.base.models.organizer import OrganizerBillingModel | ||
|
||
|
||
@pytest.fixture | ||
|
@@ -21,6 +22,26 @@ def organizer(): | |
return Organizer.objects.create(name='Dummy', slug='dummy') | ||
|
||
|
||
@pytest.fixture | ||
@scopes_disabled() | ||
def organizer_billing(organizer): | ||
return OrganizerBillingModel.objects.create( | ||
organizer=organizer, | ||
primary_contact_name="John Doe", | ||
primary_contact_email="[email protected]", | ||
company_or_organization_name="Eventyay", | ||
address_line_1="123 Main Street", | ||
city="San Francisco", | ||
zip_code="94105", | ||
country="US", | ||
preferred_language="en", | ||
tax_id="123456789", | ||
stripe_customer_id="cus_123456789", | ||
stripe_payment_method_id="pm_123456789", | ||
stripe_setup_intent_id="seti_123456789" | ||
) | ||
|
||
|
||
@pytest.fixture | ||
@scopes_disabled() | ||
def meta_prop(organizer): | ||
|
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,6 +10,7 @@ | |
from tests.base import SoupTest, extract_form_fields | ||
|
||
from pretix.base.models import Event, Order, Organizer, Team, User | ||
from pretix.base.models.organizer import OrganizerBillingModel | ||
from pretix.testutils.mock import mocker_context | ||
|
||
|
||
|
@@ -20,6 +21,21 @@ def setUp(self): | |
self.user = User.objects.create_user('[email protected]', 'dummy') | ||
self.orga1 = Organizer.objects.create(name='CCC', slug='ccc') | ||
self.orga2 = Organizer.objects.create(name='MRM', slug='mrm') | ||
self.orgabilling1 = OrganizerBillingModel.objects.create( | ||
organizer=self.orga1, | ||
primary_contact_name="John Doe", | ||
primary_contact_email="[email protected]", | ||
company_or_organization_name="Eventyay", | ||
address_line_1="123 Main Street", | ||
city="San Francisco", | ||
zip_code="94105", | ||
country="US", | ||
preferred_language="en", | ||
tax_id="123456789", | ||
stripe_customer_id="cus_123456789", | ||
stripe_payment_method_id="pm_123456789", | ||
stripe_setup_intent_id="seti_123456789" | ||
) | ||
self.event1 = Event.objects.create( | ||
organizer=self.orga1, name='30C3', slug='30c3', | ||
date_from=datetime.datetime(2013, 12, 26, tzinfo=datetime.timezone.utc), | ||
|