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
c3434fed
Kaydet (Commit)
c3434fed
authored
Şub 13, 2014
tarafından
Baptiste Mispelon
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Removed test for migration check forgotten in
7e941ba6
.
üst
f0f1ba75
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
43 deletions
+0
-43
test_checks.py
tests/migrations/test_checks.py
+0
-43
No files found.
tests/migrations/test_checks.py
deleted
100644 → 0
Dosyayı görüntüle @
f0f1ba75
# encoding: utf8
from
django.core
import
checks
from
django.core.checks.migrations
import
check_migrations
from
django.test
import
override_settings
from
.test_base
import
MigrationTestBase
class
CheckMigrationTests
(
MigrationTestBase
):
"""
Test checks for unapplied migrations.
"""
@override_settings
(
MIGRATION_MODULES
=
{
"migrations"
:
"migrations.test_migrations"
})
def
test_unapplied
(
self
):
"""
check_migrations should return a warning when there are unapplied migrations.
"""
expected
=
[
checks
.
Warning
(
"You have unapplied migrations; "
"your app may not work properly until they are applied."
,
hint
=
"Run 'python manage.py migrate' to apply them."
,
)
]
errors
=
check_migrations
()
self
.
assertEqual
(
errors
,
expected
)
@override_settings
(
MIGRATION_MODULES
=
{
"migrations"
:
"migrations.test_migrations"
},
DATABASES
=
{})
def
test_no_databases
(
self
):
"""
Migration checks should not consider unapplied migrations if there is
no database configured.
"""
errors
=
check_migrations
()
self
.
assertEqual
(
errors
,
[])
def
test_no_unapplied
(
self
):
"""
No warning should be issued if all migrations have been applied.
"""
errors
=
check_migrations
()
self
.
assertEqual
(
errors
,
[])
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