mirror of
https://github.com/django/django.git
synced 2025-11-25 13:13:28 +00:00
Fixed #31286 -- Made database specific fields checks databases aware.
Follow up to 0b83c8cc4d.
This commit is contained in:
parent
94d4bd3a09
commit
271fdab8b7
4 changed files with 12 additions and 9 deletions
|
|
@ -27,7 +27,7 @@ class TestMultiDBChecks(SimpleTestCase):
|
|||
model = Model()
|
||||
with self._patch_check_field_on('default') as mock_check_field_default:
|
||||
with self._patch_check_field_on('other') as mock_check_field_other:
|
||||
model.check()
|
||||
model.check(databases={'default', 'other'})
|
||||
self.assertTrue(mock_check_field_default.called)
|
||||
self.assertFalse(mock_check_field_other.called)
|
||||
|
||||
|
|
@ -38,6 +38,6 @@ class TestMultiDBChecks(SimpleTestCase):
|
|||
model = OtherModel()
|
||||
with self._patch_check_field_on('other') as mock_check_field_other:
|
||||
with self._patch_check_field_on('default') as mock_check_field_default:
|
||||
model.check()
|
||||
model.check(databases={'default', 'other'})
|
||||
self.assertTrue(mock_check_field_other.called)
|
||||
self.assertFalse(mock_check_field_default.called)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue