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
98aa77fb
Commit
98aa77fb
authored
Jun 09, 2010
by
Jannis Leidel
Committed by
Sean Bleier
Jun 09, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added convenient runtest.py, thanks Carl Meyer and Alex Gaynor.
parent
c6162bc5
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
7 deletions
+33
-7
runtests.py
runtests.py
+29
-0
settings.py
tests/settings.py
+2
-5
tests.py
tests/testapp/tests.py
+2
-2
urls.py
tests/urls.py
+0
-0
No files found.
runtests.py
0 → 100644
View file @
98aa77fb
#!/usr/bin/env python
import
sys
from
os.path
import
dirname
,
abspath
from
django.conf
import
settings
if
not
settings
.
configured
:
settings
.
configure
(
DATABASE_ENGINE
=
'sqlite3'
,
INSTALLED_APPS
=
[
'tests.testapp'
,
]
)
from
django.test.simple
import
run_tests
def
runtests
(
*
test_args
):
if
not
test_args
:
test_args
=
[
'testapp'
]
parent
=
dirname
(
abspath
(
__file__
))
sys
.
path
.
insert
(
0
,
parent
)
failures
=
run_tests
(
test_args
,
verbosity
=
1
,
interactive
=
True
)
sys
.
exit
(
failures
)
if
__name__
==
'__main__'
:
runtests
(
*
sys
.
argv
[
1
:])
\ No newline at end of file
tests/settings.py
View file @
98aa77fb
DEBUG
=
True
ROOT_URLCONF
=
'urls'
DATABASE_ENGINE
=
'sqlite3'
DATABASE_NAME
=
'redis_cache.db'
INSTALLED_APPS
=
[
'testapp'
,
'test
s.test
app'
,
]
tests/testapp/tests.py
View file @
98aa77fb
...
...
@@ -4,7 +4,7 @@ import time
import
unittest
from
django.core.cache
import
get_cache
from
testapp.
models
import
Poll
,
expensive_calculation
from
models
import
Poll
,
expensive_calculation
# functions/classes for complex data type tests
def
f
():
...
...
@@ -16,7 +16,7 @@ class C:
class
RedisCacheTests
(
unittest
.
TestCase
):
"""
A common set of tests derived from Django's own cache tests
"""
def
setUp
(
self
):
# use DB 16 for testing and hope there isn't any important data :->
...
...
tests/urls.py
deleted
100644 → 0
View file @
c6162bc5
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