MCPcopy
hub / github.com/django/django / test_compose_sql_when_no_connection

Method test_compose_sql_when_no_connection

tests/backends/postgresql/tests.py:592–600  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

590 self.assertTrue(mocked_get_database_version.called)
591
592 def test_compose_sql_when_no_connection(self):
593 new_connection = no_pool_connection()
594 try:
595 self.assertEqual(
596 new_connection.ops.compose_sql("SELECT %s", ["test"]),
597 "SELECT 'test'",
598 )
599 finally:
600 new_connection.close()
601
602 def test_bypass_timezone_configuration(self):
603 from django.db.backends.postgresql.base import DatabaseWrapper

Callers

nothing calls this directly

Calls 3

compose_sqlMethod · 0.80
no_pool_connectionFunction · 0.70
closeMethod · 0.45

Tested by

no test coverage detected