Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
D
django
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
django
Commits
486e6759
Kaydet (Commit)
486e6759
authored
Eyl 21, 2012
tarafından
Claude Paroz
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #10853 -- Skipped some sessions tests with dummy cache backend
üst
e758ecc6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
tests.py
django/contrib/sessions/tests.py
+6
-0
No files found.
django/contrib/sessions/tests.py
Dosyayı görüntüle @
486e6759
...
@@ -12,6 +12,7 @@ from django.contrib.sessions.backends.file import SessionStore as FileSession
...
@@ -12,6 +12,7 @@ from django.contrib.sessions.backends.file import SessionStore as FileSession
from
django.contrib.sessions.backends.signed_cookies
import
SessionStore
as
CookieSession
from
django.contrib.sessions.backends.signed_cookies
import
SessionStore
as
CookieSession
from
django.contrib.sessions.models
import
Session
from
django.contrib.sessions.models
import
Session
from
django.contrib.sessions.middleware
import
SessionMiddleware
from
django.contrib.sessions.middleware
import
SessionMiddleware
from
django.core.cache
import
DEFAULT_CACHE_ALIAS
from
django.core.exceptions
import
ImproperlyConfigured
,
SuspiciousOperation
from
django.core.exceptions
import
ImproperlyConfigured
,
SuspiciousOperation
from
django.http
import
HttpResponse
from
django.http
import
HttpResponse
from
django.test
import
TestCase
,
RequestFactory
from
django.test
import
TestCase
,
RequestFactory
...
@@ -133,6 +134,9 @@ class SessionTestsMixin(object):
...
@@ -133,6 +134,9 @@ class SessionTestsMixin(object):
self
.
assertTrue
(
self
.
session
.
modified
)
self
.
assertTrue
(
self
.
session
.
modified
)
def
test_save
(
self
):
def
test_save
(
self
):
if
(
hasattr
(
self
.
session
,
'_cache'
)
and
'DummyCache'
in
settings
.
CACHES
[
DEFAULT_CACHE_ALIAS
][
'BACKEND'
]):
raise
unittest
.
SkipTest
(
"Session saving tests require a real cache backend"
)
self
.
session
.
save
()
self
.
session
.
save
()
self
.
assertTrue
(
self
.
session
.
exists
(
self
.
session
.
session_key
))
self
.
assertTrue
(
self
.
session
.
exists
(
self
.
session
.
session_key
))
...
@@ -296,6 +300,8 @@ class CacheDBSessionTests(SessionTestsMixin, TestCase):
...
@@ -296,6 +300,8 @@ class CacheDBSessionTests(SessionTestsMixin, TestCase):
backend
=
CacheDBSession
backend
=
CacheDBSession
@unittest.skipIf
(
'DummyCache'
in
settings
.
CACHES
[
DEFAULT_CACHE_ALIAS
][
'BACKEND'
],
"Session saving tests require a real cache backend"
)
def
test_exists_searches_cache_first
(
self
):
def
test_exists_searches_cache_first
(
self
):
self
.
session
.
save
()
self
.
session
.
save
()
with
self
.
assertNumQueries
(
0
):
with
self
.
assertNumQueries
(
0
):
...
...
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