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
b3cd9e0d
Kaydet (Commit)
b3cd9e0d
authored
Şub 10, 2015
tarafından
Tim Graham
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Moved contrib.messages tests out of contrib.
üst
fac3a34c
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
12 additions
and
21 deletions
+12
-21
__init__.py
tests/messages_tests/__init__.py
+0
-0
base.py
tests/messages_tests/base.py
+1
-10
test_api.py
tests/messages_tests/test_api.py
+0
-0
test_cookie.py
tests/messages_tests/test_cookie.py
+2
-1
test_fallback.py
tests/messages_tests/test_fallback.py
+4
-7
test_middleware.py
tests/messages_tests/test_middleware.py
+0
-0
test_mixins.py
tests/messages_tests/test_mixins.py
+3
-2
test_session.py
tests/messages_tests/test_session.py
+2
-1
urls.py
tests/messages_tests/urls.py
+0
-0
No files found.
django/contrib/messages/
tests/__init__.py
→
tests/messages_
tests/__init__.py
Dosyayı görüntüle @
b3cd9e0d
File moved
django/contrib/messages/
tests/base.py
→
tests/messages_
tests/base.py
Dosyayı görüntüle @
b3cd9e0d
from
unittest
import
skipUnless
from
django
import
http
from
django.apps
import
apps
from
django.contrib.messages
import
constants
,
get_level
,
set_level
,
utils
from
django.contrib.messages.api
import
MessageFailure
from
django.contrib.messages.constants
import
DEFAULT_LEVELS
...
...
@@ -12,12 +9,6 @@ from django.test import modify_settings, override_settings
from
django.utils.translation
import
ugettext_lazy
def
skipUnlessAuthIsInstalled
(
func
):
return
skipUnless
(
apps
.
is_installed
(
'django.contrib.auth'
),
"django.contrib.auth isn't installed"
)(
func
)
def
add_level_messages
(
storage
):
"""
Adds 6 messages from different levels (including a custom one) to a storage
...
...
@@ -68,7 +59,7 @@ class BaseTests(object):
),
},
}],
ROOT_URLCONF
=
'
django.contrib.messages.
tests.urls'
,
ROOT_URLCONF
=
'
messages_
tests.urls'
,
MESSAGE_TAGS
=
''
,
MESSAGE_STORAGE
=
'
%
s.
%
s'
%
(
self
.
storage_class
.
__module__
,
self
.
storage_class
.
__name__
),
...
...
django/contrib/messages/
tests/test_api.py
→
tests/messages_
tests/test_api.py
Dosyayı görüntüle @
b3cd9e0d
File moved
django/contrib/messages/
tests/test_cookie.py
→
tests/messages_
tests/test_cookie.py
Dosyayı görüntüle @
b3cd9e0d
...
...
@@ -5,10 +5,11 @@ from django.contrib.messages.storage.base import Message
from
django.contrib.messages.storage.cookie
import
(
CookieStorage
,
MessageDecoder
,
MessageEncoder
,
)
from
django.contrib.messages.tests.base
import
BaseTests
from
django.test
import
TestCase
,
override_settings
from
django.utils.safestring
import
SafeData
,
mark_safe
from
.base
import
BaseTests
def
set_cookie_data
(
storage
,
messages
,
invalid
=
False
,
encode_empty
=
False
):
"""
...
...
django/contrib/messages/
tests/test_fallback.py
→
tests/messages_
tests/test_fallback.py
Dosyayı görüntüle @
b3cd9e0d
...
...
@@ -2,15 +2,12 @@ from django.contrib.messages import constants
from
django.contrib.messages.storage.fallback
import
(
CookieStorage
,
FallbackStorage
,
)
from
django.contrib.messages.tests.base
import
BaseTests
from
django.contrib.messages.tests.test_cookie
import
(
set_cookie_data
,
stored_cookie_messages_count
,
)
from
django.contrib.messages.tests.test_session
import
(
set_session_data
,
stored_session_messages_count
,
)
from
django.test
import
TestCase
from
.base
import
BaseTests
from
.test_cookie
import
set_cookie_data
,
stored_cookie_messages_count
from
.test_session
import
set_session_data
,
stored_session_messages_count
class
FallbackTest
(
BaseTests
,
TestCase
):
storage_class
=
FallbackStorage
...
...
django/contrib/messages/
tests/test_middleware.py
→
tests/messages_
tests/test_middleware.py
Dosyayı görüntüle @
b3cd9e0d
File moved
django/contrib/messages/
tests/test_mixins.py
→
tests/messages_
tests/test_mixins.py
Dosyayı görüntüle @
b3cd9e0d
from
django.contrib.messages.tests.urls
import
ContactFormViewWithMsg
from
django.core.urlresolvers
import
reverse
from
django.test
import
TestCase
,
override_settings
from
.urls
import
ContactFormViewWithMsg
@override_settings
(
ROOT_URLCONF
=
'django.contrib.messages.tests.urls'
)
@override_settings
(
ROOT_URLCONF
=
'messages_tests.urls'
)
class
SuccessMessageMixinTests
(
TestCase
):
def
test_set_messages_success
(
self
):
...
...
django/contrib/messages/
tests/test_session.py
→
tests/messages_
tests/test_session.py
Dosyayı görüntüle @
b3cd9e0d
from
django.contrib.messages
import
constants
from
django.contrib.messages.storage.base
import
Message
from
django.contrib.messages.storage.session
import
SessionStorage
from
django.contrib.messages.tests.base
import
BaseTests
from
django.test
import
TestCase
from
django.utils.safestring
import
SafeData
,
mark_safe
from
.base
import
BaseTests
def
set_session_data
(
storage
,
messages
):
"""
...
...
django/contrib/messages/
tests/urls.py
→
tests/messages_
tests/urls.py
Dosyayı görüntüle @
b3cd9e0d
File moved
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