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
13dba4db
Kaydet (Commit)
13dba4db
authored
Kas 21, 2015
tarafından
Alex Morozov
Kaydeden (comit)
Claude Paroz
Kas 21, 2015
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #25780 -- Removed redundant status code assertions from tests
üst
68554d16
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
0 additions
and
26 deletions
+0
-26
tests.py
tests/admin_custom_urls/tests.py
+0
-4
tests.py
tests/admin_inlines/tests.py
+0
-1
tests.py
tests/admin_views/tests.py
+0
-0
test_csrf.py
tests/flatpages_tests/test_csrf.py
+0
-3
test_middleware.py
tests/flatpages_tests/test_middleware.py
+0
-6
test_views.py
tests/flatpages_tests/test_views.py
+0
-3
test_base.py
tests/generic_views/test_base.py
+0
-1
tests.py
tests/handlers/tests.py
+0
-4
test_response.py
tests/template_tests/test_response.py
+0
-1
tests.py
tests/test_client/tests.py
+0
-2
test_i18n.py
tests/view_tests/tests/test_i18n.py
+0
-1
No files found.
tests/admin_custom_urls/tests.py
Dosyayı görüntüle @
13dba4db
...
...
@@ -62,7 +62,6 @@ class AdminCustomUrlsTest(TestCase):
string works.
"""
response
=
self
.
client
.
get
(
reverse
(
'admin_custom_urls:admin_custom_urls_action_add'
),
{
'name'
:
'My Action'
})
self
.
assertEqual
(
response
.
status_code
,
200
)
self
.
assertContains
(
response
,
'value="My Action"'
)
def
test_basic_add_POST
(
self
):
...
...
@@ -75,7 +74,6 @@ class AdminCustomUrlsTest(TestCase):
"description"
:
"Description of added action"
,
}
response
=
self
.
client
.
post
(
reverse
(
'admin_custom_urls:admin_custom_urls_action_add'
),
post_data
)
self
.
assertEqual
(
response
.
status_code
,
200
)
self
.
assertContains
(
response
,
'dismissAddRelatedObjectPopup'
)
self
.
assertContains
(
response
,
'Action added through a popup'
)
...
...
@@ -88,7 +86,6 @@ class AdminCustomUrlsTest(TestCase):
url
=
reverse
(
'admin_custom_urls:
%
s_action_change'
%
Action
.
_meta
.
app_label
,
args
=
(
quote
(
'add'
),))
response
=
self
.
client
.
get
(
url
)
self
.
assertEqual
(
response
.
status_code
,
200
)
self
.
assertContains
(
response
,
'Change action'
)
# Should correctly get the change_view for the model instance with the
...
...
@@ -96,7 +93,6 @@ class AdminCustomUrlsTest(TestCase):
url
=
reverse
(
'admin_custom_urls:
%
s_action_change'
%
Action
.
_meta
.
app_label
,
args
=
(
quote
(
"path/to/html/document.html"
),))
response
=
self
.
client
.
get
(
url
)
self
.
assertEqual
(
response
.
status_code
,
200
)
self
.
assertContains
(
response
,
'Change action'
)
self
.
assertContains
(
response
,
'value="path/to/html/document.html"'
)
...
...
tests/admin_inlines/tests.py
Dosyayı görüntüle @
13dba4db
...
...
@@ -492,7 +492,6 @@ class TestInlineProtectedOnDelete(TestDataMixin, TestCase):
'chapter_set-0-DELETE'
:
'on'
}
response
=
self
.
client
.
post
(
change_url
,
data
)
self
.
assertEqual
(
response
.
status_code
,
200
)
self
.
assertContains
(
response
,
"Deleting chapter
%
s would require deleting "
"the following protected related objects: foot note
%
s"
%
(
chapter
,
foot_note
))
...
...
tests/admin_views/tests.py
Dosyayı görüntüle @
13dba4db
This diff is collapsed.
Click to expand it.
tests/flatpages_tests/test_csrf.py
Dosyayı görüntüle @
13dba4db
...
...
@@ -57,7 +57,6 @@ class FlatpageCSRFTests(TestCase):
def
test_view_flatpage
(
self
):
"A flatpage can be served through a view, even when the middleware is in use"
response
=
self
.
client
.
get
(
'/flatpage_root/flatpage/'
)
self
.
assertEqual
(
response
.
status_code
,
200
)
self
.
assertContains
(
response
,
"<p>Isn't it flat!</p>"
)
def
test_view_non_existent_flatpage
(
self
):
...
...
@@ -72,13 +71,11 @@ class FlatpageCSRFTests(TestCase):
User
.
objects
.
create_user
(
'testuser'
,
'test@example.com'
,
's3krit'
)
self
.
client
.
login
(
username
=
'testuser'
,
password
=
's3krit'
)
response
=
self
.
client
.
get
(
'/flatpage_root/sekrit/'
)
self
.
assertEqual
(
response
.
status_code
,
200
)
self
.
assertContains
(
response
,
"<p>Isn't it sekrit!</p>"
)
def
test_fallback_flatpage
(
self
):
"A flatpage can be served by the fallback middleware"
response
=
self
.
client
.
get
(
'/flatpage/'
)
self
.
assertEqual
(
response
.
status_code
,
200
)
self
.
assertContains
(
response
,
"<p>Isn't it flat!</p>"
)
def
test_fallback_non_existent_flatpage
(
self
):
...
...
tests/flatpages_tests/test_middleware.py
Dosyayı görüntüle @
13dba4db
...
...
@@ -57,7 +57,6 @@ class FlatpageMiddlewareTests(TestDataMixin, TestCase):
def
test_view_flatpage
(
self
):
"A flatpage can be served through a view, even when the middleware is in use"
response
=
self
.
client
.
get
(
'/flatpage_root/flatpage/'
)
self
.
assertEqual
(
response
.
status_code
,
200
)
self
.
assertContains
(
response
,
"<p>Isn't it flat!</p>"
)
def
test_view_non_existent_flatpage
(
self
):
...
...
@@ -72,13 +71,11 @@ class FlatpageMiddlewareTests(TestDataMixin, TestCase):
User
.
objects
.
create_user
(
'testuser'
,
'test@example.com'
,
's3krit'
)
self
.
client
.
login
(
username
=
'testuser'
,
password
=
's3krit'
)
response
=
self
.
client
.
get
(
'/flatpage_root/sekrit/'
)
self
.
assertEqual
(
response
.
status_code
,
200
)
self
.
assertContains
(
response
,
"<p>Isn't it sekrit!</p>"
)
def
test_fallback_flatpage
(
self
):
"A flatpage can be served by the fallback middleware"
response
=
self
.
client
.
get
(
'/flatpage/'
)
self
.
assertEqual
(
response
.
status_code
,
200
)
self
.
assertContains
(
response
,
"<p>Isn't it flat!</p>"
)
def
test_fallback_non_existent_flatpage
(
self
):
...
...
@@ -93,7 +90,6 @@ class FlatpageMiddlewareTests(TestDataMixin, TestCase):
User
.
objects
.
create_user
(
'testuser'
,
'test@example.com'
,
's3krit'
)
self
.
client
.
login
(
username
=
'testuser'
,
password
=
's3krit'
)
response
=
self
.
client
.
get
(
'/sekrit/'
)
self
.
assertEqual
(
response
.
status_code
,
200
)
self
.
assertContains
(
response
,
"<p>Isn't it sekrit!</p>"
)
def
test_fallback_flatpage_special_chars
(
self
):
...
...
@@ -108,7 +104,6 @@ class FlatpageMiddlewareTests(TestDataMixin, TestCase):
fp
.
sites
.
add
(
settings
.
SITE_ID
)
response
=
self
.
client
.
get
(
'/some.very_special~chars-here/'
)
self
.
assertEqual
(
response
.
status_code
,
200
)
self
.
assertContains
(
response
,
"<p>Isn't it special!</p>"
)
...
...
@@ -176,5 +171,4 @@ class FlatpageMiddlewareAppendSlashTests(TestDataMixin, TestCase):
fp
.
sites
.
add
(
settings
.
SITE_ID
)
response
=
self
.
client
.
get
(
'/'
)
self
.
assertEqual
(
response
.
status_code
,
200
)
self
.
assertContains
(
response
,
"<p>Root</p>"
)
tests/flatpages_tests/test_views.py
Dosyayı görüntüle @
13dba4db
...
...
@@ -57,7 +57,6 @@ class FlatpageViewTests(TestDataMixin, TestCase):
def
test_view_flatpage
(
self
):
"A flatpage can be served through a view"
response
=
self
.
client
.
get
(
'/flatpage_root/flatpage/'
)
self
.
assertEqual
(
response
.
status_code
,
200
)
self
.
assertContains
(
response
,
"<p>Isn't it flat!</p>"
)
def
test_view_non_existent_flatpage
(
self
):
...
...
@@ -72,7 +71,6 @@ class FlatpageViewTests(TestDataMixin, TestCase):
User
.
objects
.
create_user
(
'testuser'
,
'test@example.com'
,
's3krit'
)
self
.
client
.
login
(
username
=
'testuser'
,
password
=
's3krit'
)
response
=
self
.
client
.
get
(
'/flatpage_root/sekrit/'
)
self
.
assertEqual
(
response
.
status_code
,
200
)
self
.
assertContains
(
response
,
"<p>Isn't it sekrit!</p>"
)
def
test_fallback_flatpage
(
self
):
...
...
@@ -97,7 +95,6 @@ class FlatpageViewTests(TestDataMixin, TestCase):
fp
.
sites
.
add
(
settings
.
SITE_ID
)
response
=
self
.
client
.
get
(
'/flatpage_root/some.very_special~chars-here/'
)
self
.
assertEqual
(
response
.
status_code
,
200
)
self
.
assertContains
(
response
,
"<p>Isn't it special!</p>"
)
...
...
tests/generic_views/test_base.py
Dosyayı görüntüle @
13dba4db
...
...
@@ -247,7 +247,6 @@ class TemplateViewTest(SimpleTestCase):
def
_assert_about
(
self
,
response
):
response
.
render
()
self
.
assertEqual
(
response
.
status_code
,
200
)
self
.
assertContains
(
response
,
'<h1>About</h1>'
)
def
test_get
(
self
):
...
...
tests/handlers/tests.py
Dosyayı görüntüle @
13dba4db
...
...
@@ -182,19 +182,15 @@ class HandlerNotFoundTest(SimpleTestCase):
def
test_invalid_urls
(
self
):
response
=
self
.
client
.
get
(
'~
%
A9helloworld'
)
self
.
assertEqual
(
response
.
status_code
,
404
)
self
.
assertContains
(
response
,
'~
%
A9helloworld'
,
status_code
=
404
)
response
=
self
.
client
.
get
(
'd
%
aao
%
aaw
%
aan
%
aal
%
aao
%
aaa
%
aad
%
aa/'
)
self
.
assertEqual
(
response
.
status_code
,
404
)
self
.
assertContains
(
response
,
'd
%
AAo
%
AAw
%
AAn
%
AAl
%
AAo
%
AAa
%
AAd
%
AA'
,
status_code
=
404
)
response
=
self
.
client
.
get
(
'/
%
E2
%99%
E2
%99%
A5/'
)
self
.
assertEqual
(
response
.
status_code
,
404
)
self
.
assertContains
(
response
,
'
%
E2
%99
\u2665
'
,
status_code
=
404
)
response
=
self
.
client
.
get
(
'/
%
E2
%98%8
E
%
E2
%
A9
%
E2
%99%
A5/'
)
self
.
assertEqual
(
response
.
status_code
,
404
)
self
.
assertContains
(
response
,
'
\u260e
%
E2
%
A9
\u2665
'
,
status_code
=
404
)
def
test_environ_path_info_type
(
self
):
...
...
tests/template_tests/test_response.py
Dosyayı görüntüle @
13dba4db
...
...
@@ -326,7 +326,6 @@ class CustomURLConfTest(SimpleTestCase):
def
test_custom_urlconf
(
self
):
response
=
self
.
client
.
get
(
'/template_response_view/'
)
self
.
assertEqual
(
response
.
status_code
,
200
)
self
.
assertContains
(
response
,
'This is where you can find the snark: /snark/'
)
...
...
tests/test_client/tests.py
Dosyayı görüntüle @
13dba4db
...
...
@@ -729,7 +729,6 @@ class RequestFactoryTest(SimpleTestCase):
request
=
self
.
request_factory
.
get
(
'/somewhere/'
)
response
=
get_view
(
request
)
self
.
assertEqual
(
response
.
status_code
,
200
)
self
.
assertContains
(
response
,
'This is a test'
)
def
test_trace_request_from_factory
(
self
):
...
...
@@ -740,5 +739,4 @@ class RequestFactoryTest(SimpleTestCase):
protocol
=
request
.
META
[
"SERVER_PROTOCOL"
]
echoed_request_line
=
"TRACE {} {}"
.
format
(
url_path
,
protocol
)
self
.
assertEqual
(
response
.
status_code
,
200
)
self
.
assertContains
(
response
,
echoed_request_line
)
tests/view_tests/tests/test_i18n.py
Dosyayı görüntüle @
13dba4db
...
...
@@ -208,7 +208,6 @@ class JsI18NTests(SimpleTestCase):
"""
with
self
.
settings
(
LANGUAGE_CODE
=
'en-us'
),
override
(
'fr'
):
response
=
self
.
client
.
get
(
'/jsi18n/app5/'
)
self
.
assertEqual
(
response
.
status_code
,
200
)
self
.
assertContains
(
response
,
'emoji'
)
self
.
assertContains
(
response
,
'
\\
ud83d
\\
udca9'
)
...
...
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