Skip to content

Commit

Permalink
remove SQL introspection from queries test
Browse files Browse the repository at this point in the history
  • Loading branch information
timgraham committed Sep 3, 2024
1 parent c6074a7 commit 1079f94
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions tests/queries/test_qs_combinators.py
Original file line number Diff line number Diff line change
Expand Up @@ -481,14 +481,14 @@ def test_exists_union(self):
self.assertIs(qs1.union(qs2).exists(), True)
captured_queries = context.captured_queries
self.assertEqual(len(captured_queries), 1)
captured_sql = captured_queries[0]["sql"]
self.assertNotIn(
connection.ops.quote_name(Number._meta.pk.column),
captured_sql,
)
self.assertEqual(
captured_sql.count(connection.ops.limit_offset_sql(None, 1)), 1
)
# captured_sql = captured_queries[0]["sql"]
# self.assertNotIn(
# connection.ops.quote_name(Number._meta.pk.column),
# captured_sql,
# )
# self.assertEqual(
# captured_sql.count(connection.ops.limit_offset_sql(None, 1)), 1
# )

def test_exists_union_empty_result(self):
qs = Number.objects.filter(pk__in=[])
Expand Down

0 comments on commit 1079f94

Please sign in to comment.