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
dffda2ba
Kaydet (Commit)
dffda2ba
authored
Tem 30, 2013
tarafından
Tim Graham
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed a test that depended on the DB backend; refs #19877. Thanks Loic.
üst
5b47a9c5
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
11 deletions
+16
-11
color_command.py
tests/admin_scripts/management/commands/color_command.py
+9
-0
tests.py
tests/admin_scripts/tests.py
+7
-11
No files found.
tests/admin_scripts/management/commands/color_command.py
0 → 100644
Dosyayı görüntüle @
dffda2ba
from
django.core.management.base
import
NoArgsCommand
class
Command
(
NoArgsCommand
):
help
=
"Test color output"
requires_model_validation
=
False
def
handle_noargs
(
self
,
**
options
):
return
self
.
style
.
SQL_KEYWORD
(
'BEGIN'
)
tests/admin_scripts/tests.py
Dosyayı görüntüle @
dffda2ba
...
...
@@ -1282,17 +1282,13 @@ class CommandTypes(AdminScriptTestCase):
def
test_no_color
(
self
):
"--no-color prevent colorization of the output"
out
=
StringIO
()
call_command
(
"sqlall"
,
"admin_scripts"
,
no_color
=
True
,
stdout
=
out
)
self
.
assertEqual
(
out
.
getvalue
(),
"""BEGIN;
CREATE TABLE "admin_scripts_article" (
"id" integer NOT NULL PRIMARY KEY,
"headline" varchar(100) NOT NULL,
"pub_date" datetime NOT NULL
)
;
COMMIT;
"""
)
call_command
(
'color_command'
,
no_color
=
True
,
stdout
=
out
)
self
.
assertEqual
(
out
.
getvalue
(),
'BEGIN
\n
'
)
out
=
StringIO
()
call_command
(
'color_command'
,
stdout
=
out
)
self
.
assertEqual
(
out
.
getvalue
(),
'
\x1b
[33mBEGIN
\x1b
[0m
\n
'
)
def
test_base_command
(
self
):
"User BaseCommands can execute when a label is provided"
...
...
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