(self)
| 1089 | ) |
| 1090 | |
| 1091 | def test_annotate_with_dates(self): |
| 1092 | # Regression for #10248 - Annotations work with dates() |
| 1093 | qs = ( |
| 1094 | Book.objects.annotate(num_authors=Count("authors")) |
| 1095 | .filter(num_authors=2) |
| 1096 | .dates("pubdate", "day") |
| 1097 | ) |
| 1098 | self.assertSequenceEqual( |
| 1099 | qs, |
| 1100 | [ |
| 1101 | datetime.date(1995, 1, 15), |
| 1102 | datetime.date(2007, 12, 6), |
| 1103 | ], |
| 1104 | ) |
| 1105 | |
| 1106 | def test_extra_select_grouping_with_params(self): |
| 1107 | # Regression for #10290 - extra selects with parameters can be used for |