MCPcopy
hub / github.com/django/django / test_has_key_query_columns_quoted

Method test_has_key_query_columns_quoted

tests/cache/tests.py:1374–1381  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1372 self.assertEqual(out.getvalue(), "Cache table 'test cache table' created.\n")
1373
1374 def test_has_key_query_columns_quoted(self):
1375 with CaptureQueriesContext(connection) as captured_queries:
1376 cache.has_key("key")
1377 self.assertEqual(len(captured_queries), 1)
1378 sql = captured_queries[0]["sql"]
1379 # Column names are quoted.
1380 self.assertIn(connection.ops.quote_name("expires"), sql)
1381 self.assertIn(connection.ops.quote_name("cache_key"), sql)
1382
1383
1384@override_settings(USE_TZ=True)

Callers

nothing calls this directly

Calls 3

has_keyMethod · 0.45
quote_nameMethod · 0.45

Tested by

no test coverage detected