diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/m2m_through/tests.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/m2m_through/tests.py b/tests/m2m_through/tests.py index 83449a7c7b..81a47a2083 100644 --- a/tests/m2m_through/tests.py +++ b/tests/m2m_through/tests.py @@ -533,3 +533,11 @@ class M2mThroughToFieldsTests(TestCase): [choice[0] for choice in field.get_choices(include_blank=False)], ["pea", "potato", "tomato"], ) + + def test_count(self): + self.assertEqual(self.curry.ingredients.count(), 3) + self.assertEqual(self.tomato.recipes.count(), 1) + + def test_exists(self): + self.assertTrue(self.curry.ingredients.exists()) + self.assertTrue(self.tomato.recipes.exists()) |
