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
6670da75
Kaydet (Commit)
6670da75
authored
Şub 19, 2016
tarafından
Akshesh
Kaydeden (comit)
Tim Graham
Şub 19, 2016
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #25653 -- Made --selenium run only the selenium tests.
üst
032f5a78
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
2 deletions
+11
-2
tests.py
django/contrib/admin/tests.py
+2
-1
unit-tests.txt
docs/internals/contributing/writing-code/unit-tests.txt
+3
-0
runtests.py
tests/runtests.py
+4
-0
test_i18n.py
tests/view_tests/tests/test_i18n.py
+2
-1
No files found.
django/contrib/admin/tests.py
Dosyayı görüntüle @
6670da75
...
...
@@ -2,7 +2,7 @@ import os
from
unittest
import
SkipTest
from
django.contrib.staticfiles.testing
import
StaticLiveServerTestCase
from
django.test
import
modify_settings
from
django.test
import
modify_settings
,
tag
from
django.utils.module_loading
import
import_string
from
django.utils.translation
import
ugettext
as
_
...
...
@@ -14,6 +14,7 @@ class CSPMiddleware(object):
return
response
@tag
(
'selenium'
)
@modify_settings
(
MIDDLEWARE_CLASSES
=
{
'append'
:
'django.contrib.admin.tests.CSPMiddleware'
},
)
...
...
docs/internals/contributing/writing-code/unit-tests.txt
Dosyayı görüntüle @
6670da75
...
...
@@ -128,6 +128,9 @@ install the selenium_ package into your Python path and run the tests with the
$ ./runtests.py --settings=test_sqlite --selenium admin_inlines
Specifying ``--selenium`` automatically sets ``--tags=selenium`` to run only
the tests that require selenium.
.. _running-unit-tests-dependencies:
Running all the tests
...
...
tests/runtests.py
Dosyayı görüntüle @
6670da75
...
...
@@ -439,6 +439,10 @@ if __name__ == "__main__":
if
options
.
selenium
:
os
.
environ
[
'DJANGO_SELENIUM_TESTS'
]
=
'1'
if
not
options
.
tags
:
options
.
tags
=
[
'selenium'
]
elif
'selenium'
not
in
options
.
tags
:
options
.
tags
.
append
(
'selenium'
)
if
options
.
bisect
:
bisect_tests
(
options
.
bisect
,
options
,
options
.
modules
,
options
.
parallel
)
...
...
tests/view_tests/tests/test_i18n.py
Dosyayı görüntüle @
6670da75
...
...
@@ -10,7 +10,7 @@ from os import path
from
django.conf
import
settings
from
django.test
import
(
LiveServerTestCase
,
SimpleTestCase
,
TestCase
,
modify_settings
,
override_settings
,
override_settings
,
tag
,
)
from
django.urls
import
reverse
from
django.utils
import
six
...
...
@@ -260,6 +260,7 @@ skip_selenium = not os.environ.get('DJANGO_SELENIUM_TESTS', False)
@unittest.skipIf
(
skip_selenium
,
'Selenium tests not requested'
)
@tag
(
'selenium'
)
@override_settings
(
ROOT_URLCONF
=
'view_tests.urls'
)
class
JavascriptI18nTests
(
LiveServerTestCase
):
...
...
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