﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
24023	Apps with intial_data and migrations kill test runner	Alex Hayes	nobody	"It appears that in Django 1.7.1 when you run `manage.py test` it attempts to `loaddata` for apps with `initial_data.*` prior(1) to the migrations for those apps being applied.

According to the docs the loading of initial_data.* files has been deprecated in 1.7.

I would expect and assume that this is true for running tests also, however what happens is that the tests attempt to load the initial data which results in a django.db.utils.OperationalError (essentially it attempts to load the data but the tables don't exist).

I've created a github repo of a project that illustrates the issue and contains a trace - see https://github.com/alexhayes/apps-with-migrations-and-initial-data-break-tests

As outlined in the projects readme I would expect that the tests completely ignore the initial_data.* files for apps that have migrations (as migrate does now) and that I have to create a data migration, as outlined in the documentation.

The obvious workaround for this is just remove the `initial_data.*` files however it's not clear in the documentation that this is the case.

(1) Note, as detailed in my example github project, the migrations are indeed run prior to load data, but they don't seem to be applied."	Bug	closed	Testing framework	1.7	Normal	duplicate			Unreviewed	0	0	0	0	0	0
