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
e7b804c0
Kaydet (Commit)
e7b804c0
authored
Ara 20, 2017
tarafından
Tim Graham
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #28941 -- Fixed crash in testserver command startup.
Regression in
2b09e4c8
.
üst
c8a85e3e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
1 deletion
+31
-1
runserver.py
django/core/management/commands/runserver.py
+1
-0
2.0.1.txt
docs/releases/2.0.1.txt
+2
-0
tests.py
tests/admin_scripts/tests.py
+28
-1
No files found.
django/core/management/commands/runserver.py
Dosyayı görüntüle @
e7b804c0
...
@@ -27,6 +27,7 @@ class Command(BaseCommand):
...
@@ -27,6 +27,7 @@ class Command(BaseCommand):
# Validation is called explicitly each time the server is reloaded.
# Validation is called explicitly each time the server is reloaded.
requires_system_checks
=
False
requires_system_checks
=
False
leave_locale_alone
=
True
leave_locale_alone
=
True
stealth_options
=
(
'shutdown_message'
,)
default_addr
=
'127.0.0.1'
default_addr
=
'127.0.0.1'
default_addr_ipv6
=
'::1'
default_addr_ipv6
=
'::1'
...
...
docs/releases/2.0.1.txt
Dosyayı görüntüle @
e7b804c0
...
@@ -29,3 +29,5 @@ Bugfixes
...
@@ -29,3 +29,5 @@ Bugfixes
* Fixed a regression on SQLite where ``DecimalField`` returned a result with
* Fixed a regression on SQLite where ``DecimalField`` returned a result with
trailing zeros in the fractional part truncated (:ticket:`28915`).
trailing zeros in the fractional part truncated (:ticket:`28915`).
* Fixed crash in the ``testserver`` command startup (:ticket:`28941`).
tests/admin_scripts/tests.py
Dosyayı görüntüle @
e7b804c0
...
@@ -21,7 +21,9 @@ from django.conf import settings
...
@@ -21,7 +21,9 @@ from django.conf import settings
from
django.core.management
import
(
from
django.core.management
import
(
BaseCommand
,
CommandError
,
call_command
,
color
,
BaseCommand
,
CommandError
,
call_command
,
color
,
)
)
from
django.db
import
ConnectionHandler
from
django.core.management.commands.loaddata
import
Command
as
LoaddataCommand
from
django.core.management.commands.runserver
import
Command
as
RunserverCommand
from
django.db
import
ConnectionHandler
,
connection
from
django.db.migrations.recorder
import
MigrationRecorder
from
django.db.migrations.recorder
import
MigrationRecorder
from
django.test
import
(
from
django.test
import
(
LiveServerTestCase
,
SimpleTestCase
,
TestCase
,
override_settings
,
LiveServerTestCase
,
SimpleTestCase
,
TestCase
,
override_settings
,
...
@@ -1416,6 +1418,31 @@ class ManageTestserver(AdminScriptTestCase):
...
@@ -1416,6 +1418,31 @@ class ManageTestserver(AdminScriptTestCase):
skip_checks
=
True
,
interactive
=
True
,
skip_checks
=
True
,
interactive
=
True
,
)
)
@mock.patch
(
'django.db.connection.creation.create_test_db'
,
return_value
=
'test_db'
)
@mock.patch.object
(
LoaddataCommand
,
'handle'
,
return_value
=
''
)
@mock.patch.object
(
RunserverCommand
,
'handle'
,
return_value
=
''
)
def
test_params_to_runserver
(
self
,
mock_runserver_handle
,
mock_loaddata_handle
,
mock_create_test_db
):
out
=
StringIO
()
call_command
(
'testserver'
,
'blah.json'
,
stdout
=
out
)
mock_runserver_handle
.
assert_called_with
(
addrport
=
''
,
insecure_serving
=
False
,
no_color
=
False
,
pythonpath
=
None
,
settings
=
None
,
shutdown_message
=
(
"
\n
Server stopped.
\n
Note that the test database, 'test_db', "
"has not been deleted. You can explore it on your own."
),
skip_checks
=
True
,
traceback
=
False
,
use_ipv6
=
False
,
use_reloader
=
False
,
use_static_handler
=
True
,
use_threading
=
connection
.
features
.
test_db_allows_multiple_connections
,
verbosity
=
1
,
)
##########################################################################
##########################################################################
# COMMAND PROCESSING TESTS
# COMMAND PROCESSING TESTS
...
...
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