mirror of
https://github.com/Hopiu/django-rosetta.git
synced 2026-05-23 11:45:53 +00:00
Small refactoring of tests
This commit is contained in:
parent
7afdffb34a
commit
a5ea8cc35e
3 changed files with 8 additions and 1 deletions
1
CHANGES
1
CHANGES
|
|
@ -5,6 +5,7 @@ Version 0.7.3
|
|||
* Missing context variable in catalog list (Issue #87 - Thanks @kunitoki)
|
||||
* Added support for Yandex translation API (Issue #89 - Thanks @BlackWizard) See supported languages and limitations here: https://github.com/mbi/django-rosetta/pull/89
|
||||
* Removed support for the signed_cookies SESSION_ENGINE + SessionRosettaStorage in Django 1.6, because serialization of POFiles would fail
|
||||
* Simplified the group membership test (Issue #90 - Thanks @dotsbb)
|
||||
|
||||
Version 0.7.2
|
||||
-------------
|
||||
|
|
|
|||
|
|
@ -60,3 +60,7 @@ STORAGE_CLASS = getattr(settings, 'ROSETTA_STORAGE_CLASS', 'rosetta.storage.Cach
|
|||
ROSETTA_CACHE_NAME = getattr(settings, 'ROSETTA_CACHE_NAME', 'default'
|
||||
if settings.CACHES.get('rosetta', None) is None
|
||||
else 'rosetta')
|
||||
|
||||
# Require users to be authenticated (and Superusers or in group "translators").
|
||||
# Set this to False at your own risk
|
||||
ROSETTA_REQUIRES_AUTH = getattr(settings, 'ROSETTA_REQUIRES_AUTH', True)
|
||||
|
|
|
|||
|
|
@ -57,6 +57,7 @@ class RosettaTestCase(TestCase):
|
|||
|
||||
self.__session_engine = settings.SESSION_ENGINE
|
||||
self.__storage_class = rosetta_settings.STORAGE_CLASS
|
||||
self.__require_auth = rosetta_settings.ROSETTA_REQUIRES_AUTH
|
||||
|
||||
shutil.copy(self.dest_file, self.dest_file + '.orig')
|
||||
|
||||
|
|
@ -64,6 +65,7 @@ class RosettaTestCase(TestCase):
|
|||
settings.LANGUAGES = self.__old_settings_languages
|
||||
settings.SESSION_ENGINE = self.__session_engine
|
||||
rosetta_settings.STORAGE_CLASS = self.__storage_class
|
||||
rosetta_settings.ROSETTA_REQUIRES_AUTH = self.__require_auth
|
||||
shutil.move(self.dest_file + '.orig', self.dest_file)
|
||||
|
||||
def test_1_ListLoading(self):
|
||||
|
|
@ -581,7 +583,7 @@ class RosettaTestCase(TestCase):
|
|||
r = self.client.get(reverse('rosetta-pick-file'))
|
||||
self.assertTrue('<li class="active"><a href="?filter=third-party">' in str(r.content))
|
||||
|
||||
def test_1_unsupported_p3_django_16_storage(self):
|
||||
def test_29_unsupported_p3_django_16_storage(self):
|
||||
if self.django_version_minor >= 6 and self.django_version_major >= 1:
|
||||
self.assertTrue('django.contrib.sessions.middleware.SessionMiddleware' in settings.MIDDLEWARE_CLASSES)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue