1
0
mirror of https://github.com/django/django.git synced 2025-10-24 14:16:09 +00:00

Added test for ForeignObject.get_extra_descriptor_filter()

This commit is contained in:
Alex Hill
2015-08-03 19:44:13 +10:00
committed by Tim Graham
parent 14c1fd0730
commit b47e862d3a
2 changed files with 4 additions and 1 deletions

View File

@@ -319,6 +319,9 @@ class MultiColumnFKTests(TestCase):
at1_fi.save()
at2_en = ArticleTranslation(article=a1, lang='en', title='Title', body='Lalalalala')
at2_en.save()
self.assertEqual(Article.objects.get(pk=a1.pk).active_translation, at1_fi)
with self.assertNumQueries(1):
fetched = Article.objects.select_related('active_translation').get(
active_translation__title='Otsikko')