diff options
Diffstat (limited to 'tests/model_forms')
| -rw-r--r-- | tests/model_forms/tests.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/model_forms/tests.py b/tests/model_forms/tests.py index d1c5b00d8a..f4216ca51b 100644 --- a/tests/model_forms/tests.py +++ b/tests/model_forms/tests.py @@ -2854,6 +2854,10 @@ class LimitChoicesToTest(TestCase): f = StumpJokeWithCustomFieldForm() self.assertEqual(f.fields['custom'].queryset, 42) + def test_fields_for_model_applies_limit_choices_to(self): + fields = fields_for_model(StumpJoke, ['has_fooled_today']) + self.assertSequenceEqual(fields['has_fooled_today'].queryset, [self.threepwood]) + class FormFieldCallbackTests(SimpleTestCase): |
