MCPcopy
hub / github.com/django/django / test_repr

Method test_repr

tests/queries/test_sqlcompiler.py:13–21  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

11
12class SQLCompilerTest(TestCase):
13 def test_repr(self):
14 query = Query(Item)
15 compiler = query.get_compiler(DEFAULT_DB_ALIAS, connection)
16 self.assertEqual(
17 repr(compiler),
18 f"<SQLCompiler model=Item connection="
19 f"<DatabaseWrapper vendor={connection.vendor!r} alias='default'> "
20 f"using='default'>",
21 )
22
23 def test_execute_sql_suppresses_cursor_closing_failure_on_exception(self):
24 query = Query(Item)

Callers

nothing calls this directly

Calls 2

get_compilerMethod · 0.95
QueryClass · 0.90

Tested by

no test coverage detected