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
b67f2ac8
Kaydet (Commit)
b67f2ac8
authored
Haz 06, 2013
tarafından
Claude Paroz
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #20502 (again) -- More i18n cache flush in tests
Thanks Timo Graham for noticing the failures.
üst
9ed971f4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
4 deletions
+14
-4
tests.py
django/contrib/humanize/tests.py
+3
-1
test_regressions.py
tests/forms_tests/tests/test_regressions.py
+2
-1
tests.py
tests/template_tests/tests.py
+9
-2
No files found.
django/contrib/humanize/tests.py
Dosyayı görüntüle @
b67f2ac8
...
...
@@ -19,6 +19,8 @@ from django.utils.translation import ugettext as _
from
django.utils
import
tzinfo
from
django.utils.unittest
import
skipIf
from
i18n
import
TransRealMixin
# Mock out datetime in some tests so they don't fail occasionally when they
# run too slow. Use a fixed datetime for datetime.now(). DST change in
...
...
@@ -36,7 +38,7 @@ class MockDateTime(datetime.datetime):
return
now
.
replace
(
tzinfo
=
tz
)
+
tz
.
utcoffset
(
now
)
class
HumanizeTests
(
TestCase
):
class
HumanizeTests
(
T
ransRealMixin
,
T
estCase
):
def
humanize_tester
(
self
,
test_list
,
result_list
,
method
):
for
test_content
,
result
in
zip
(
test_list
,
result_list
):
...
...
tests/forms_tests/tests/test_regressions.py
Dosyayı görüntüle @
b67f2ac8
...
...
@@ -8,9 +8,10 @@ from django.test import TestCase
from
django.utils.translation
import
ugettext_lazy
,
override
from
forms_tests.models
import
Cheese
from
i18n
import
TransRealMixin
class
FormsRegressionsTestCase
(
TestCase
):
class
FormsRegressionsTestCase
(
T
ransRealMixin
,
T
estCase
):
def
test_class
(
self
):
# Tests to prevent against recurrences of earlier bugs.
extra_attrs
=
{
'class'
:
'special'
}
...
...
tests/template_tests/tests.py
Dosyayı görüntüle @
b67f2ac8
...
...
@@ -36,6 +36,7 @@ from django.utils.safestring import mark_safe
from
django.utils
import
six
from
django.utils.tzinfo
import
LocalTimezone
from
i18n
import
TransRealMixin
try
:
from
.loaders
import
RenderToStringTest
,
EggLoaderTest
...
...
@@ -154,8 +155,8 @@ class UTF8Class:
def
__str__
(
self
):
return
'ŠĐĆŽćžšđ'
@override_settings
(
MEDIA_URL
=
"/media/"
,
STATIC_URL
=
"/static/"
)
class
Templates
(
TestCase
):
class
Template
LoaderTest
s
(
TestCase
):
def
test_loaders_security
(
self
):
ad_loader
=
app_directories
.
Loader
()
...
...
@@ -347,6 +348,9 @@ class Templates(TestCase):
loader
.
template_source_loaders
=
old_loaders
settings
.
TEMPLATE_DEBUG
=
old_td
class
TemplateRegressionTests
(
TestCase
):
def
test_token_smart_split
(
self
):
# Regression test for #7027
token
=
template
.
Token
(
template
.
TOKEN_BLOCK
,
'sometag _("Page not found") value|yesno:_("yes,no")'
)
...
...
@@ -453,6 +457,9 @@ class Templates(TestCase):
with
self
.
assertRaises
(
urlresolvers
.
NoReverseMatch
):
t
.
render
(
Context
({}))
@override_settings
(
MEDIA_URL
=
"/media/"
,
STATIC_URL
=
"/static/"
)
class
TemplateTests
(
TransRealMixin
,
TestCase
):
def
test_templates
(
self
):
template_tests
=
self
.
get_template_tests
()
filter_tests
=
filters
.
get_filter_tests
()
...
...
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