def squash_migrations_test(): project_dir = "testdata/good_squash/" apps = get_south_apps(project_dir) app_to_migration_path = {} for app in apps: app_dir = os.path.join(project_dir, app) app_to_migration_path[app] = \ get_path_of_sole_initial_migration(app_dir) squashed_migration = squash_migrations(app_to_migration_path) got = squashed_migration.getvalue() expected_path = "testdata/good_squash/expected_result.py" assert_equal_ignorespace_with_diff(got, expected_path)
def get_south_apps_test(): nose.tools.assert_equal( set(get_south_apps("testdata/good_squash/")), set(['app_alpha', 'app_beta', 'app_gamma', 'app_delta']) )