mirror of
https://github.com/pretix/pretix.git
synced 2026-05-05 15:14:04 +00:00
Move testdummy plugin to the test directory
This commit is contained in:
@@ -95,7 +95,6 @@ INSTALLED_APPS = (
|
||||
'bootstrap3',
|
||||
'debug_toolbar.apps.DebugToolbarConfig',
|
||||
'djangoformsetjs',
|
||||
'pretix.plugins.testdummy',
|
||||
'pretix.plugins.timerestriction',
|
||||
'pretix.plugins.banktransfer',
|
||||
'pretix.plugins.stripe',
|
||||
|
||||
@@ -49,9 +49,9 @@ class PluginSignalTest(TestCase):
|
||||
self.assertEqual(len(responses), 0)
|
||||
|
||||
def test_one_plugin_active(self):
|
||||
self.event.plugins = 'pretix.plugins.testdummy'
|
||||
self.event.plugins = 'tests.testdummy'
|
||||
self.event.save()
|
||||
payload = {'foo': 'bar'}
|
||||
responses = determine_availability.send(self.event, **payload)
|
||||
self.assertEqual(len(responses), 1)
|
||||
self.assertIn('pretix.plugins.testdummy.signals', [r[0].__module__ for r in responses])
|
||||
self.assertIn('tests.testdummy.signals', [r[0].__module__ for r in responses])
|
||||
|
||||
@@ -328,7 +328,7 @@ class CartTest(CartTestMixin, TestCase):
|
||||
self.assertFalse(CartPosition.objects.current.filter(user=self.user, event=self.event).exists())
|
||||
|
||||
def test_restriction_failed(self):
|
||||
self.event.plugins = 'pretix.plugins.testdummy'
|
||||
self.event.plugins = 'tests.testdummy'
|
||||
self.event.save()
|
||||
self.event.settings.testdummy_available = 'yes'
|
||||
response = self.client.post('/%s/%s/cart/add' % (self.orga.slug, self.event.slug), {
|
||||
@@ -343,7 +343,7 @@ class CartTest(CartTestMixin, TestCase):
|
||||
self.assertEqual(objs[0].price, 23)
|
||||
|
||||
def test_restriction_ok(self):
|
||||
self.event.plugins = 'pretix.plugins.testdummy'
|
||||
self.event.plugins = 'tests.testdummy'
|
||||
self.event.save()
|
||||
self.event.settings.testdummy_available = 'no'
|
||||
response = self.client.post('/%s/%s/cart/add' % (self.orga.slug, self.event.slug), {
|
||||
|
||||
@@ -3,3 +3,7 @@ from pretix.settings import *
|
||||
TEST_DIR = os.path.dirname(__file__)
|
||||
|
||||
TEMPLATES[0]['DIRS'].append(os.path.join(TEST_DIR, 'templates'))
|
||||
|
||||
INSTALLED_APPS = INSTALLED_APPS + (
|
||||
'tests.testdummy',
|
||||
)
|
||||
|
||||
@@ -3,7 +3,7 @@ from pretix.base.plugins import PluginType
|
||||
|
||||
|
||||
class TestDummyApp(AppConfig):
|
||||
name = 'pretix.plugins.testdummy'
|
||||
name = 'tests.testdummy'
|
||||
verbose_name = '.testdummy'
|
||||
|
||||
class PretixPluginMeta:
|
||||
@@ -12,6 +12,7 @@ class TestDummyApp(AppConfig):
|
||||
version = '1.0.0'
|
||||
|
||||
def ready(self):
|
||||
from . import signals # NOQA
|
||||
from tests.testdummy import signals
|
||||
|
||||
default_app_config = 'pretix.plugins.testdummy.TestDummyApp'
|
||||
|
||||
default_app_config = 'tests.testdummy.TestDummyApp'
|
||||
Reference in New Issue
Block a user