Commit 991ecbe3 authored by Sean Bleier's avatar Sean Bleier

Clear caches at the beginning of the test to remove cached cache instance.

parent 6e413f92
import time import time
from django.core.cache import caches
from django.test import TestCase, override_settings from django.test import TestCase, override_settings
from redis_cache.connection import pool from redis_cache.connection import pool
...@@ -35,6 +36,9 @@ class MasterSlaveTestCase(SetupMixin, TestCase): ...@@ -35,6 +36,9 @@ class MasterSlaveTestCase(SetupMixin, TestCase):
pool.reset() pool.reset()
def test_master_client(self): def test_master_client(self):
# Reset the caches at the beginning of the test.
caches._caches.caches = {}
cache = self.get_cache() cache = self.get_cache()
client = cache.master_client client = cache.master_client
self.assertEqual( self.assertEqual(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment