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
fa654da6
Kaydet (Commit)
fa654da6
authored
Haz 14, 2016
tarafından
Ville Skyttä
Kaydeden (comit)
Tim Graham
Haz 14, 2016
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Removed usage of a few deprecated unittest assertions.
üst
7003174f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
test_urls.py
tests/check_framework/test_urls.py
+2
-1
test_functional.py
tests/utils_tests/test_functional.py
+3
-3
No files found.
tests/check_framework/test_urls.py
Dosyayı görüntüle @
fa654da6
...
...
@@ -4,6 +4,7 @@ from django.core.checks.urls import (
)
from
django.test
import
SimpleTestCase
from
django.test.utils
import
override_settings
from
django.utils
import
six
class
CheckUrlsTest
(
SimpleTestCase
):
...
...
@@ -34,7 +35,7 @@ class CheckUrlsTest(SimpleTestCase):
result
=
check_url_config
(
None
)
warning
=
result
[
0
]
self
.
assertEqual
(
warning
.
id
,
'urls.E004'
)
s
elf
.
assertRegexpMatches
(
warning
.
msg
,
(
s
ix
.
assertRegex
(
self
,
warning
.
msg
,
(
r"^Your URL pattern \('\^tuple/\$', <function <lambda> at 0x(\w+)>\) is "
r"invalid. Ensure that urlpatterns is a list of url\(\) instances.$"
))
...
...
tests/utils_tests/test_functional.py
Dosyayı görüntüle @
fa654da6
...
...
@@ -134,14 +134,14 @@ class FunctionalTestCase(unittest.TestCase):
def
test_lazy_repr_text
(
self
):
original_object
=
'Lazy translation text'
lazy_obj
=
lazy
(
lambda
:
original_object
,
six
.
text_type
)
self
.
assertEqual
s
(
repr
(
original_object
),
repr
(
lazy_obj
()))
self
.
assertEqual
(
repr
(
original_object
),
repr
(
lazy_obj
()))
def
test_lazy_repr_int
(
self
):
original_object
=
15
lazy_obj
=
lazy
(
lambda
:
original_object
,
int
)
self
.
assertEqual
s
(
repr
(
original_object
),
repr
(
lazy_obj
()))
self
.
assertEqual
(
repr
(
original_object
),
repr
(
lazy_obj
()))
def
test_lazy_repr_bytes
(
self
):
original_object
=
b
'J
\xc3\xbc
st a str
\xc3\xad
ng'
lazy_obj
=
lazy
(
lambda
:
original_object
,
bytes
)
self
.
assertEqual
s
(
repr
(
original_object
),
repr
(
lazy_obj
()))
self
.
assertEqual
(
repr
(
original_object
),
repr
(
lazy_obj
()))
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