(self)
| 1368 | self.assertEqual(book.is_book, 1) |
| 1369 | |
| 1370 | def test_basic_alias_f_annotation(self): |
| 1371 | qs = Book.objects.alias(another_rating_alias=F("rating")).annotate( |
| 1372 | another_rating=F("another_rating_alias") |
| 1373 | ) |
| 1374 | self.assertIs(hasattr(qs.first(), "another_rating_alias"), False) |
| 1375 | for book in qs: |
| 1376 | with self.subTest(book=book): |
| 1377 | self.assertEqual(book.another_rating, book.rating) |
| 1378 | |
| 1379 | def test_basic_alias_f_transform_annotation(self): |
| 1380 | qs = Book.objects.alias( |