forked from CGM_Public/pretix_original
Move testdummy plugin to the test directory
This commit is contained in:
@@ -1,17 +0,0 @@
|
||||
from django.apps import AppConfig
|
||||
from pretix.base.plugins import PluginType
|
||||
|
||||
|
||||
class TestDummyApp(AppConfig):
|
||||
name = 'pretix.plugins.testdummy'
|
||||
verbose_name = '.testdummy'
|
||||
|
||||
class PretixPluginMeta:
|
||||
type = PluginType.RESTRICTION
|
||||
name = '.testdummy'
|
||||
version = '1.0.0'
|
||||
|
||||
def ready(self):
|
||||
from . import signals # NOQA
|
||||
|
||||
default_app_config = 'pretix.plugins.testdummy.TestDummyApp'
|
||||
@@ -1,15 +0,0 @@
|
||||
from django.dispatch import receiver
|
||||
|
||||
from pretix.base.signals import determine_availability
|
||||
|
||||
|
||||
@receiver(determine_availability)
|
||||
def availability_handler(sender, **kwargs):
|
||||
kwargs['sender'] = sender
|
||||
if sender.settings.testdummy_available is not None:
|
||||
variations = kwargs['variations']
|
||||
variations = [d.copy() for d in variations]
|
||||
for v in variations:
|
||||
v['available'] = (sender.settings.testdummy_available == 'yes')
|
||||
return variations
|
||||
return []
|
||||
Reference in New Issue
Block a user