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
11a53555
Kaydet (Commit)
11a53555
authored
May 03, 2012
tarafından
Claude Paroz
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Inserted more simplefilter calls to be sure warnings are emitted.
Thanks to Florian Apolloner for suggesting the patch.
üst
00c0d3c4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
0 deletions
+5
-0
tests.py
django/contrib/sessions/tests.py
+1
-0
tests.py
tests/regressiontests/logging_tests/tests.py
+1
-0
tests.py
tests/regressiontests/requests/tests.py
+1
-0
text.py
tests/regressiontests/utils/text.py
+2
-0
No files found.
django/contrib/sessions/tests.py
Dosyayı görüntüle @
11a53555
...
...
@@ -352,6 +352,7 @@ class CacheSessionTests(SessionTestsMixin, unittest.TestCase):
def
test_load_overlong_key
(
self
):
with
warnings
.
catch_warnings
(
record
=
True
)
as
w
:
warnings
.
simplefilter
(
"always"
)
self
.
session
.
_session_key
=
(
string
.
ascii_letters
+
string
.
digits
)
*
20
self
.
assertEqual
(
self
.
session
.
load
(),
{})
self
.
assertEqual
(
len
(
w
),
1
)
...
...
tests/regressiontests/logging_tests/tests.py
Dosyayı görüntüle @
11a53555
...
...
@@ -43,6 +43,7 @@ class PatchLoggingConfigTest(TestCase):
config
=
copy
.
deepcopy
(
OLD_LOGGING
)
with
warnings
.
catch_warnings
(
record
=
True
)
as
w
:
warnings
.
simplefilter
(
"always"
)
compat_patch_logging_config
(
config
)
self
.
assertEqual
(
len
(
w
),
1
)
...
...
tests/regressiontests/requests/tests.py
Dosyayı görüntüle @
11a53555
...
...
@@ -415,6 +415,7 @@ class RequestsTests(unittest.TestCase):
'wsgi.input'
:
ExplodingStringIO
(
payload
)})
with
warnings
.
catch_warnings
(
record
=
True
)
as
w
:
warnings
.
simplefilter
(
"always"
)
with
self
.
assertRaises
(
UnreadablePostError
):
request
.
raw_post_data
self
.
assertEqual
(
len
(
w
),
1
)
tests/regressiontests/utils/text.py
Dosyayı görüntüle @
11a53555
...
...
@@ -73,6 +73,7 @@ class TestUtilsText(SimpleTestCase):
def
test_old_truncate_words
(
self
):
with
warnings
.
catch_warnings
(
record
=
True
)
as
w
:
warnings
.
simplefilter
(
"always"
)
self
.
assertEqual
(
u'The quick brown fox jumped over the lazy dog.'
,
text
.
truncate_words
(
u'The quick brown fox jumped over the lazy dog.'
,
10
))
self
.
assertEqual
(
u'The quick brown fox ...'
,
...
...
@@ -83,6 +84,7 @@ class TestUtilsText(SimpleTestCase):
def
test_old_truncate_html_words
(
self
):
with
warnings
.
catch_warnings
(
record
=
True
)
as
w
:
warnings
.
simplefilter
(
"always"
)
self
.
assertEqual
(
u'<p><strong><em>The quick brown fox jumped over the lazy dog.</em></strong></p>'
,
text
.
truncate_html_words
(
'<p><strong><em>The quick brown fox jumped over the lazy dog.</em></strong></p>'
,
10
))
self
.
assertEqual
(
u'<p><strong><em>The quick brown fox ...</em></strong></p>'
,
...
...
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