Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

update for Django 1.6 #25

Open
wants to merge 1 commit into from

4 participants

@washort

No description provided.

@washort washort referenced this pull request in mozilla/zamboni
Closed

Port to Django 1.6 #1769

@jsocol
Collaborator

Does this affect compatibility with 1.4esr or 1.5 at all? Changing the cache timeout seems like it would

@peterbe
Collaborator

I just ran this patch in a django 1.4.10 project and ran the tests. It worked.

@davedash
Collaborator

We should make a travis.yml that tests against these in a matrix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 4, 2014
  1. @washort

    update for Django 1.6

    washort authored
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 3 deletions.
  1. +3 −2 test_utils/__init__.py
  2. +0 −1  test_utils/runner.py
View
5 test_utils/__init__.py
@@ -69,7 +69,7 @@ def _pre_setup(self):
# allow others to prepare
signals.pre_setup.send(sender=self.__class__)
cache.cache.clear()
- settings.CACHE_COUNT_TIMEOUT = None
+ settings.CACHE_COUNT_TIMEOUT = -1
settings.TEMPLATE_DEBUG = settings.DEBUG = False
super(BaseTestCase, self)._pre_setup()
@@ -220,6 +220,7 @@ def _pre_setup(self):
"""Disable transaction methods, and clear some globals."""
# Repeat stuff from TransactionTestCase, because I'm not calling its
# _pre_setup, because that would load fixtures again.
+ self.client = self.client_class()
cache.cache.clear()
settings.TEMPLATE_DEBUG = settings.DEBUG = False
@@ -281,7 +282,7 @@ def __init__(self, *args, **kwargs):
def _pre_setup(self):
"""Adjust cache-machine settings, and send custom pre-setup signal."""
signals.pre_setup.send(sender=self.__class__)
- settings.CACHE_COUNT_TIMEOUT = None
+ settings.CACHE_COUNT_TIMEOUT = -1
trans_real.deactivate()
trans_real._translations = {} # Django fails to clear this cache.
trans_real.activate(settings.LANGUAGE_CODE)
View
1  test_utils/runner.py
@@ -60,7 +60,6 @@ def create_test_db(self, verbosity=1, autoclobber=False):
# Django v1.2 and lower
rollback = self._rollback_works()
self.connection.settings_dict['SUPPORTS_TRANSACTIONS'] = rollback
-
return self._get_test_db_name()
Something went wrong with that request. Please try again.