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
07b6404d
Kaydet (Commit)
07b6404d
authored
May 20, 2014
tarafından
Claude Paroz
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Merge pull request #2688 from whoshuu/22661
Fixed #22661 -- Move makemigrations tests to the proper class
üst
ba5ddf7a
44304cf0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
22 deletions
+22
-22
test_commands.py
tests/migrations/test_commands.py
+22
-22
No files found.
tests/migrations/test_commands.py
Dosyayı görüntüle @
07b6404d
...
@@ -85,28 +85,6 @@ class MigrateTests(MigrationTestBase):
...
@@ -85,28 +85,6 @@ class MigrateTests(MigrationTestBase):
with
self
.
assertRaises
(
CommandError
):
with
self
.
assertRaises
(
CommandError
):
call_command
(
"migrate"
,
"migrations"
)
call_command
(
"migrate"
,
"migrations"
)
@override_system_checks
([])
@override_settings
(
MIGRATION_MODULES
=
{
"migrations"
:
"migrations.test_migrations_conflict"
})
def
test_makemigrations_conflict_exit
(
self
):
"""
Makes sure that makemigrations exits if it detects a conflict.
"""
with
self
.
assertRaises
(
CommandError
):
call_command
(
"makemigrations"
)
@override_system_checks
([])
@override_settings
(
MIGRATION_MODULES
=
{
"migrations"
:
"migrations.test_migrations_conflict"
})
def
test_makemigrations_merge_basic
(
self
):
"""
Makes sure that makemigrations doesn't error if you ask for
merge mode with a conflict present. Doesn't test writing of the merge
file, as that requires temp directories.
"""
try
:
call_command
(
"makemigrations"
,
merge
=
True
,
verbosity
=
0
)
except
CommandError
:
self
.
fail
(
"Makemigrations errored in merge mode with conflicts"
)
@override_system_checks
([])
@override_system_checks
([])
@override_settings
(
MIGRATION_MODULES
=
{
"migrations"
:
"migrations.test_migrations"
})
@override_settings
(
MIGRATION_MODULES
=
{
"migrations"
:
"migrations.test_migrations"
})
def
test_sqlmigrate
(
self
):
def
test_sqlmigrate
(
self
):
...
@@ -211,3 +189,25 @@ class MakeMigrationsTests(MigrationTestBase):
...
@@ -211,3 +189,25 @@ class MakeMigrationsTests(MigrationTestBase):
initial_file
=
os
.
path
.
join
(
self
.
migration_dir
,
"0001_initial.py"
)
initial_file
=
os
.
path
.
join
(
self
.
migration_dir
,
"0001_initial.py"
)
self
.
assertFalse
(
os
.
path
.
exists
(
initial_file
))
self
.
assertFalse
(
os
.
path
.
exists
(
initial_file
))
@override_system_checks
([])
@override_settings
(
MIGRATION_MODULES
=
{
"migrations"
:
"migrations.test_migrations_conflict"
})
def
test_makemigrations_conflict_exit
(
self
):
"""
Makes sure that makemigrations exits if it detects a conflict.
"""
with
self
.
assertRaises
(
CommandError
):
call_command
(
"makemigrations"
)
@override_system_checks
([])
@override_settings
(
MIGRATION_MODULES
=
{
"migrations"
:
"migrations.test_migrations_conflict"
})
def
test_makemigrations_merge_basic
(
self
):
"""
Makes sure that makemigrations doesn't error if you ask for
merge mode with a conflict present. Doesn't test writing of the merge
file, as that requires temp directories.
"""
try
:
call_command
(
"makemigrations"
,
merge
=
True
,
verbosity
=
0
)
except
CommandError
:
self
.
fail
(
"Makemigrations errored in merge mode with conflicts"
)
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