Fixed test plugin.

This commit is contained in:
Norman Jäckel 2016-02-16 22:51:38 +01:00
parent d181eedeb9
commit dcc325c716
7 changed files with 24 additions and 6 deletions

View File

@ -1,7 +1,6 @@
import os
import pkgutil
import sys
from importlib import import_module
from django.apps import apps
from django.conf import settings

View File

@ -70,8 +70,8 @@ class VersionView(TestCase):
self.assertEqual(json.loads(response.content.decode()), {
'openslides_version': version,
'plugins': [
{'verbose_name': 'Plugin tests.old.utils',
'description': 'Description of plugin tests.old.utils',
{'verbose_name': 'OpenSlides Test Plugin',
'description': 'This is a test plugin for OpenSlides.',
'version': 'unknown'}]})

View File

@ -0,0 +1,4 @@
__verbose_name__ = 'OpenSlides Test Plugin'
__description__ = 'This is a test plugin for OpenSlides.'
default_app_config = 'tests.integration.test_plugin.apps.TestPluginAppConfig'

View File

@ -0,0 +1,10 @@
from django.apps import AppConfig
from . import __description__, __verbose_name__
class TestPluginAppConfig(AppConfig):
name = 'tests.integration.test_plugin'
label = 'tests.integration.test_plugin'
verbose_name = __verbose_name__
description = __description__

View File

@ -1,2 +1 @@
__verbose_name__ = 'Plugin tests.old.utils'
__description__ = 'Description of plugin tests.old.utils'
default_app_config = 'tests.old.utils.apps.TestPluginAppConfig'

6
tests/old/utils/apps.py Normal file
View File

@ -0,0 +1,6 @@
from django.apps import AppConfig
class TestPluginAppConfig(AppConfig):
name = 'tests.old.utils'
label = 'tests.old.utils'

View File

@ -17,7 +17,7 @@ SECRET_KEY = 'secret'
# Add plugins to this list.
INSTALLED_PLUGINS += (
'tests.old.utils',
'tests.integration.test_plugin',
)
INSTALLED_APPS += INSTALLED_PLUGINS