File tree Expand file tree Collapse file tree 1 file changed +24
-2
lines changed Expand file tree Collapse file tree 1 file changed +24
-2
lines changed Original file line number Diff line number Diff line change @@ -325,10 +325,32 @@ def test_inner_south():
325
325
testdir .create_initial_south_migration ()
326
326
327
327
result = testdir .runpytest ('--tb=short' , '-v' , '-s' )
328
- assert result .ret != 0
329
- result .stderr .fnmatch_lines (['*no such table: app_item*' ])
328
+ assert result .ret == 0
330
329
result .stdout .fnmatch_lines (['*mark_south_migration_forwards*' ])
331
330
331
+ @pytest .mark .django_project (extra_settings = """
332
+ INSTALLED_APPS += [ 'south', ]
333
+ SOUTH_TESTS_MIGRATE = True
334
+ SOUTH_MIGRATION_MODULES = {
335
+ 'app': 'tpkg.app.south_migrations',
336
+ }
337
+ """ )
338
+ def test_initial_without_south_migrations (self , django_testdir_initial ):
339
+ """Using South, but without any migrations should still load the
340
+ initial data."""
341
+ django_testdir_initial .create_test_module ('''
342
+ import pytest
343
+
344
+ @pytest.mark.django_db
345
+ def test_inner_south():
346
+ pass
347
+ ''' )
348
+
349
+ result = django_testdir_initial .runpytest ('--tb=short' , '-v' , '-s' )
350
+ assert result .ret == 0
351
+ result .stdout .fnmatch_lines (['*PASSED*' ])
352
+ assert 'mark_south_migration_forwards' not in result .stdout .str ()
353
+
332
354
@pytest .mark .django_project (extra_settings = """
333
355
INSTALLED_APPS += [ 'south', ]
334
356
SOUTH_TESTS_MIGRATE = True
You can’t perform that action at this time.
0 commit comments