Minor cleanup in select_related_regress tests.

This commit is contained in:
Aymeric Augustin 2014-05-10 16:41:54 +02:00
parent f574220f09
commit edecbb551b
1 changed files with 1 additions and 5 deletions

View File

@ -163,17 +163,13 @@ class SelectRelatedRegressTests(TestCase):
self.assertTrue('LEFT OUTER' in str(qs.query)) self.assertTrue('LEFT OUTER' in str(qs.query))
def test_regression_19870(self): def test_regression_19870(self):
"""
Regression for #19870
"""
hen = Hen.objects.create(name='Hen') hen = Hen.objects.create(name='Hen')
Chick.objects.create(name='Chick', mother=hen) Chick.objects.create(name='Chick', mother=hen)
self.assertEqual(Chick.objects.all()[0].mother.name, 'Hen') self.assertEqual(Chick.objects.all()[0].mother.name, 'Hen')
self.assertEqual(Chick.objects.select_related()[0].mother.name, 'Hen') self.assertEqual(Chick.objects.select_related()[0].mother.name, 'Hen')
def test_ticket_10733(self): def test_regression_10733(self):
a = A.objects.create(name='a', lots_of_text='lots_of_text_a', a_field='a_field') a = A.objects.create(name='a', lots_of_text='lots_of_text_a', a_field='a_field')
b = B.objects.create(name='b', lots_of_text='lots_of_text_b', b_field='b_field') b = B.objects.create(name='b', lots_of_text='lots_of_text_b', b_field='b_field')
c = C.objects.create(name='c', lots_of_text='lots_of_text_c', is_published=True, c = C.objects.create(name='c', lots_of_text='lots_of_text_c', is_published=True,