From 6fa2930573ff862a7f8ae8a11aa8bb7253fddeb7 Mon Sep 17 00:00:00 2001 From: Jonny Park Date: Fri, 26 Mar 2021 16:14:09 +0900 Subject: Refs #24121 -- Added __repr__() to BaseDatabaseWrapper, JoinPromoter, and SQLCompiler. --- tests/queries/test_sqlcompiler.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 tests/queries/test_sqlcompiler.py (limited to 'tests/queries/test_sqlcompiler.py') diff --git a/tests/queries/test_sqlcompiler.py b/tests/queries/test_sqlcompiler.py new file mode 100644 index 0000000000..3116429c05 --- /dev/null +++ b/tests/queries/test_sqlcompiler.py @@ -0,0 +1,17 @@ +from django.db import DEFAULT_DB_ALIAS, connection +from django.db.models.sql import Query +from django.test import SimpleTestCase + +from .models import Item + + +class SQLCompilerTest(SimpleTestCase): + def test_repr(self): + query = Query(Item) + compiler = query.get_compiler(DEFAULT_DB_ALIAS, connection) + self.assertEqual( + repr(compiler), + f" " + f"using='default'>" + ) -- cgit v1.3