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
f795977c
Commit
f795977c
authored
Jun 24, 2015
by
Sean Bleier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a little delay.
parent
3400a552
Hide 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 @
f795977c
import
time
from
django.test
import
TestCase
try
:
from
django.test
import
override_settings
...
...
@@ -48,6 +50,7 @@ class MasterSlaveTestCase(SetupMixin, TestCase):
def
test_set
(
self
):
cache
=
self
.
get_cache
()
cache
.
set
(
'a'
,
'a'
)
time
.
sleep
(
.5
)
for
client
in
self
.
cache
.
clients
.
itervalues
():
key
=
cache
.
make_key
(
'a'
)
self
.
assertIsNotNone
(
client
.
get
(
key
))
...
...
@@ -65,6 +68,7 @@ class MasterSlaveTestCase(SetupMixin, TestCase):
cache
=
self
.
get_cache
()
cache
.
set
(
'a'
,
0
)
cache
.
incr
(
'a'
)
time
.
sleep
(
.5
)
key
=
cache
.
make_key
(
'a'
)
for
client
in
self
.
cache
.
clients
.
itervalues
():
self
.
assertEqual
(
client
.
get
(
key
),
'1'
)
...
...
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