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
847171b0
Kaydet (Commit)
847171b0
authored
Şub 18, 2014
tarafından
Baptiste Mispelon
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed test failures when running in a narrow Python build.
üst
cd027aaa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
test_text.py
tests/utils_tests/test_text.py
+5
-0
No files found.
tests/utils_tests/test_text.py
Dosyayı görüntüle @
847171b0
# -*- coding: utf-8 -*-
from
__future__
import
unicode_literals
from
unittest
import
skipUnless
from
django.test
import
SimpleTestCase
from
django.utils
import
six
,
text
IS_WIDE_BUILD
=
(
len
(
'
\U0001F4A9
'
)
==
1
)
class
TestUtilsText
(
SimpleTestCase
):
...
...
@@ -156,6 +160,7 @@ class TestUtilsText(SimpleTestCase):
self
.
assertEqual
(
text
.
javascript_quote
(
input
,
quote_double_quotes
=
True
),
'"Text"'
)
@skipUnless
(
IS_WIDE_BUILD
)
def
test_javascript_quote_unicode
(
self
):
input
=
"<script>alert('Hello
\\
xff.
\n
Wel𝕃come
\t
here
\r
');</script>"
output
=
r"<script>alert(\'Hello \\xff.\n Wel𝕃come\there\r\');<\/script>"
...
...
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