@@ -297,6 +297,9 @@ def test_inner_south():
297
297
}
298
298
""" )
299
299
def test_initial_south_migrations (self , django_testdir_initial ):
300
+ """
301
+ Test initial data with existing South migrations.
302
+ """
300
303
testdir = django_testdir_initial
301
304
testdir .create_test_module ('''
302
305
import pytest
@@ -306,15 +309,10 @@ def test_inner_south():
306
309
pass
307
310
''' )
308
311
309
- testdir .mkpydir ('tpkg/app/south_migrations' )
310
- testdir .create_app_file ("""
311
- from south.v2 import SchemaMigration
312
+ testdir .create_initial_south_migration ()
312
313
313
- class Migration(SchemaMigration):
314
- def forwards(self, orm):
315
- print("mark_south_migration_forwards")
316
- """ , 'south_migrations/0001_initial.py' )
317
314
result = testdir .runpytest ('--tb=short' , '-v' , '-s' )
315
+ result .stdout .fnmatch_lines (['*test_inner_south*PASSED*' ])
318
316
result .stdout .fnmatch_lines (['*mark_south_migration_forwards*' ])
319
317
320
318
@pytest .mark .django_project (extra_settings = """
@@ -340,7 +338,7 @@ def test_inner_south():
340
338
p .write ('raise Exception("This should not get imported.")' ,
341
339
ensure = True )
342
340
343
- result = testdir .runpytest ('--tb=short' , '-v' )
341
+ result = testdir .runpytest ('--tb=short' , '-v' , '-s' )
344
342
result .stdout .fnmatch_lines (['*test_inner_south*PASSED*' ])
345
343
346
344
0 commit comments