(self)
| 181 | |
| 182 | @skipUnlessDBFeature("supports_boolean_expr_in_select_clause") |
| 183 | def test_q_annotation(self): |
| 184 | query = Query(None) |
| 185 | check = ExpressionWrapper( |
| 186 | Q(RawSQL("%s = 1", (1,), BooleanField())) | Q(Exists(Item.objects.all())), |
| 187 | BooleanField(), |
| 188 | ) |
| 189 | query.add_annotation(check, "_check") |
| 190 | result = query.get_compiler(using=DEFAULT_DB_ALIAS).execute_sql(SINGLE) |
| 191 | self.assertEqual(result[0], 1) |
| 192 | |
| 193 | def test_names_to_path_field(self): |
| 194 | query = Query(None) |
nothing calls this directly
no test coverage detected