Beispiel #1
0
# Patch the xml libs before anything else.
from safe_lxml import defuse_xml_libs
defuse_xml_libs()

# Disable PyContract contract checking when running as a webserver
import contracts
contracts.disable_all()

import os

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "cms.envs.aws")

import cms.startup as startup
startup.run()

# This application object is used by the development server
# as well as any WSGI server configured to use this file.
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()

Beispiel #2
0
 def test_run_without_theme(self):
     self.assertEqual(settings.FEATURES["USE_CUSTOM_THEME"], False)
     with patch('cms.startup.enable_theme') as mock_enable_theme:
         run()
         self.assertFalse(mock_enable_theme.called)