forked from CGM_Public/pretix_original
Do not show availability for currently-selected add-on
This commit is contained in:
@@ -2,7 +2,7 @@ from bs4 import BeautifulSoup
|
||||
from django.test import TestCase
|
||||
|
||||
|
||||
class SoupTest(TestCase):
|
||||
class SoupTestMixin:
|
||||
|
||||
def get_doc(self, *args, **kwargs):
|
||||
response = self.client.get(*args, **kwargs)
|
||||
@@ -17,6 +17,10 @@ class SoupTest(TestCase):
|
||||
return BeautifulSoup(response.content, "lxml")
|
||||
|
||||
|
||||
class SoupTest(SoupTestMixin, TestCase):
|
||||
pass
|
||||
|
||||
|
||||
def extract_form_fields(soup):
|
||||
"""
|
||||
Turn a BeautifulSoup form in to a dict of fields and default values
|
||||
|
||||
@@ -3,9 +3,10 @@ import decimal
|
||||
import json
|
||||
|
||||
from django.core import mail as djmail
|
||||
from django.test import TransactionTestCase
|
||||
from django.utils.timezone import now
|
||||
from django_scopes import scopes_disabled
|
||||
from tests.base import SoupTest, extract_form_fields
|
||||
from tests.base import SoupTestMixin, extract_form_fields
|
||||
|
||||
from pretix.base.models import (
|
||||
Event, Item, ItemVariation, Order, OrderPosition, Organizer, Quota, Team,
|
||||
@@ -13,7 +14,7 @@ from pretix.base.models import (
|
||||
)
|
||||
|
||||
|
||||
class VoucherFormTest(SoupTest):
|
||||
class VoucherFormTest(SoupTestMixin, TransactionTestCase):
|
||||
@scopes_disabled()
|
||||
def setUp(self):
|
||||
super().setUp()
|
||||
|
||||
Reference in New Issue
Block a user