Add real test data for models in unit tests.

Review Request #11382 — Created Jan. 19, 2021 and submitted — Latest diff uploaded

Information

Django Evolution
release-2.x

Reviewers

The test suite operated solely on schema changes, without any data in
the database for those models. This meant that the tests missed some
important things. For instance, on SQLite, Django Evolution 2.0
regressed adding non-NULL fields when there's data in a table, and this
wasn't caught in the tests due to the lack of data.

Now every test suite can inject data into the models prior to mutation,
ensuring that we're operating in a more real-world scenario.

This currently breaks the SQLite tests (revealing the aforementioned
bug), but those will be fixed in an upcoming change.

Unit tests pass except on SQLite (where the bug manifests).

Unit tests pass completely with an upcoming fix.

Commits

Files