(self)
| 2217 | ) |
| 2218 | |
| 2219 | def test_col_alias_quoted(self): |
| 2220 | with CaptureQueriesContext(connection) as captured_queries: |
| 2221 | self.assertEqual( |
| 2222 | Tag.objects.values("parent") |
| 2223 | .annotate( |
| 2224 | tag_per_parent=Count("pk"), |
| 2225 | ) |
| 2226 | .aggregate(Max("tag_per_parent")), |
| 2227 | {"tag_per_parent__max": 2}, |
| 2228 | ) |
| 2229 | sql = captured_queries[0]["sql"] |
| 2230 | self.assertIn("AS %s" % connection.ops.quote_name("parent"), sql) |
| 2231 | |
| 2232 | def test_xor_subquery(self): |
| 2233 | self.assertSequenceEqual( |
nothing calls this directly
no test coverage detected