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 os
import pkgutil import pkgutil
import sys import sys
from importlib import import_module
from django.apps import apps from django.apps import apps
from django.conf import settings from django.conf import settings

View File

@ -70,8 +70,8 @@ class VersionView(TestCase):
self.assertEqual(json.loads(response.content.decode()), { self.assertEqual(json.loads(response.content.decode()), {
'openslides_version': version, 'openslides_version': version,
'plugins': [ 'plugins': [
{'verbose_name': 'Plugin tests.old.utils', {'verbose_name': 'OpenSlides Test Plugin',
'description': 'Description of plugin tests.old.utils', 'description': 'This is a test plugin for OpenSlides.',
'version': 'unknown'}]}) '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' default_app_config = 'tests.old.utils.apps.TestPluginAppConfig'
__description__ = 'Description of plugin tests.old.utils'

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. # Add plugins to this list.
INSTALLED_PLUGINS += ( INSTALLED_PLUGINS += (
'tests.old.utils', 'tests.integration.test_plugin',
) )
INSTALLED_APPS += INSTALLED_PLUGINS INSTALLED_APPS += INSTALLED_PLUGINS