Add a "supports_foreign_key" database feature to ease testing
|Reported by:||akaariai||Owned by:||nobody|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||yes|
Currently our test coverage for checking that foreign keys are properly enforced in the database are almost non-existent. One reason for this is that it has not been easy to write tests, as some backends do not support foreign keys and information of foreign key support has not been available as !skipUnlessDBFeature target.
The attached patch adds a new database feature "supports_foreign_keys". The patch also uses this feature in regressiontests/backends/tests.py. The test results for backends tests are similar pre/post patch. MySQL + MyISAM fails one test both pre/post patch, other backends work correctly.
This patch is needed for writing proper tests for #18081 for example.
Change History (10)
Changed 4 years ago by akaariai
comment:1 Changed 4 years ago by claudep
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
comment:5 Changed 4 years ago by aaugustin
- Triage Stage changed from Unreviewed to Design decision needed
comment:7 Changed 3 years ago by akaariai
- Triage Stage changed from Design decision needed to Accepted