def setUp(self): if self.django_settings_module: from lino.core.signals import testcase_setup testcase_setup.send(self) super(TestCase, self).setUp()
def __call__(self, *args, **kw): """Does some initialization and sends the :attr:`testcase_setup <lino.utils.testcase_setup>` signal, then calls super. """ if self.override_djangosite_settings: settings.SITE.override_defaults(**self.override_djangosite_settings) testcase_setup.send(self) return super(DjangoManageTestCase, self).__call__(*args, **kw)
def __call__(self, *args, **kw): """Does some initialization and sends the :attr:`testcase_setup <lino.utils.testcase_setup>` signal, then calls super. """ if self.override_djangosite_settings: settings.SITE.override_defaults( **self.override_djangosite_settings) testcase_setup.send(self) return super(DjangoManageTestCase, self).__call__(*args, **kw)
def __call__(self, *args, **kw): """Does some initialization and sends the :attr:`testcase_setup <lino.utils.testcase_setup>` signal, then calls super. """ if self.override_djangosite_settings: settings.SITE.override_defaults( **self.override_djangosite_settings) # Make sure that every test runs with the same language. # Without this it is possible that some other language may # have been activated by previous tests: if settings.LANGUAGE_CODE: translation.activate(settings.LANGUAGE_CODE) testcase_setup.send(self) return super(DjangoManageTestCase, self).__call__(*args, **kw)