Add real test data for models in unit tests.
Review Request #11382 — Created Jan. 19, 2021 and submitted
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.
Summary | ID |
---|---|
719d3133205c60ff20848343e959142074894df7 |
Description | From | Last Updated |
---|---|---|
E131 continuation line unaligned for hanging indent |
reviewbot |
- Change Summary:
-
Fixed a Review Bot warning.
- Commits:
-
Summary ID 619d1c0d18e86dbe5f99769e245a2387c796042d 719d3133205c60ff20848343e959142074894df7 - Diff:
-
Revision 2 (+400 -54)