Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
D
Django-Redis-Cache
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Shared
Django-Redis-Cache
Commits
991ecbe3
Commit
991ecbe3
authored
Oct 26, 2016
by
Sean Bleier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clear caches at the beginning of the test to remove cached cache instance.
parent
6e413f92
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
master_slave_tests.py
tests/testapp/tests/master_slave_tests.py
+4
-0
No files found.
tests/testapp/tests/master_slave_tests.py
View file @
991ecbe3
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
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment