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
75f0070a
Kaydet (Commit)
75f0070a
authored
Şub 17, 2017
tarafından
Tim Graham
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #27308 -- Fixed BytesWarnings in the test suite.
üst
46960788
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
18 deletions
+5
-18
multipartparser.py
django/http/multipartparser.py
+1
-1
test_choicefield.py
tests/forms_tests/field_tests/test_choicefield.py
+1
-14
test_debug.py
tests/view_tests/tests/test_debug.py
+1
-1
test_defaults.py
tests/view_tests/tests/test_defaults.py
+2
-2
No files found.
django/http/multipartparser.py
Dosyayı görüntüle @
75f0070a
...
@@ -69,7 +69,7 @@ class MultiPartParser:
...
@@ -69,7 +69,7 @@ class MultiPartParser:
ctypes
,
opts
=
parse_header
(
content_type
.
encode
(
'ascii'
))
ctypes
,
opts
=
parse_header
(
content_type
.
encode
(
'ascii'
))
boundary
=
opts
.
get
(
'boundary'
)
boundary
=
opts
.
get
(
'boundary'
)
if
not
boundary
or
not
cgi
.
valid_boundary
(
boundary
):
if
not
boundary
or
not
cgi
.
valid_boundary
(
boundary
):
raise
MultiPartParserError
(
'Invalid boundary in multipart:
%
s'
%
boundary
)
raise
MultiPartParserError
(
'Invalid boundary in multipart:
%
s'
%
boundary
.
decode
()
)
# Content-Length should contain the length of the body we are about
# Content-Length should contain the length of the body we are about
# to receive.
# to receive.
...
...
tests/forms_tests/field_tests/test_choicefield.py
Dosyayı görüntüle @
75f0070a
from
django.forms
import
ChoiceField
,
Form
,
ValidationError
from
django.forms
import
ChoiceField
,
Form
,
ValidationError
from
django.test
import
SimpleTestCase
,
ignore_warnings
from
django.test
import
SimpleTestCase
from
.
import
FormFieldAssertionsMixin
from
.
import
FormFieldAssertionsMixin
...
@@ -82,16 +82,3 @@ class ChoiceFieldTest(FormFieldAssertionsMixin, SimpleTestCase):
...
@@ -82,16 +82,3 @@ class ChoiceFieldTest(FormFieldAssertionsMixin, SimpleTestCase):
'<select id="id_f" name="f" disabled><option value="J">John</option>'
'<select id="id_f" name="f" disabled><option value="J">John</option>'
'<option value="P">Paul</option></select>'
'<option value="P">Paul</option></select>'
)
)
@ignore_warnings
(
category
=
UnicodeWarning
)
def
test_utf8_bytesrings
(
self
):
# Choice validation with UTF-8 bytestrings as input (these are the
# Russian abbreviations "мес." and "шт.".
f
=
ChoiceField
(
choices
=
(
(
b
'
\xd0\xbc\xd0\xb5\xd1\x81
.'
,
b
'
\xd0\xbc\xd0\xb5\xd1\x81
.'
),
(
b
'
\xd1\x88\xd1\x82
.'
,
b
'
\xd1\x88\xd1\x82
.'
),
),
)
self
.
assertEqual
(
f
.
clean
(
'
\u0448\u0442
.'
),
'
\u0448\u0442
.'
)
self
.
assertEqual
(
f
.
clean
(
b
'
\xd1\x88\xd1\x82
.'
),
'
\u0448\u0442
.'
)
tests/view_tests/tests/test_debug.py
Dosyayı görüntüle @
75f0070a
...
@@ -140,7 +140,7 @@ class DebugViewTests(LoggingCaptureMixin, SimpleTestCase):
...
@@ -140,7 +140,7 @@ class DebugViewTests(LoggingCaptureMixin, SimpleTestCase):
id_repr
=
match
.
group
(
'id'
)
id_repr
=
match
.
group
(
'id'
)
self
.
assertFalse
(
self
.
assertFalse
(
re
.
search
(
b
'[^c0-9]'
,
id_repr
),
re
.
search
(
b
'[^c0-9]'
,
id_repr
),
"Numeric IDs in debug response HTML page shouldn't be localized (value:
%
s)."
%
id_repr
"Numeric IDs in debug response HTML page shouldn't be localized (value:
%
s)."
%
id_repr
.
decode
()
)
)
def
test_template_exceptions
(
self
):
def
test_template_exceptions
(
self
):
...
...
tests/view_tests/tests/test_defaults.py
Dosyayı görüntüle @
75f0070a
...
@@ -64,8 +64,8 @@ class DefaultsTests(TestCase):
...
@@ -64,8 +64,8 @@ class DefaultsTests(TestCase):
# See ticket #14565
# See ticket #14565
for
url
in
self
.
nonexistent_urls
:
for
url
in
self
.
nonexistent_urls
:
response
=
self
.
client
.
get
(
url
)
response
=
self
.
client
.
get
(
url
)
self
.
assertNotEqual
(
response
.
content
,
'NOTPROVIDED'
)
self
.
assertNotEqual
(
response
.
content
,
b
'NOTPROVIDED'
)
self
.
assertNotEqual
(
response
.
content
,
''
)
self
.
assertNotEqual
(
response
.
content
,
b
''
)
def
test_server_error
(
self
):
def
test_server_error
(
self
):
"The server_error view raises a 500 status"
"The server_error view raises a 500 status"
...
...
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