diff options
| author | Jonny Park <jonnythebard9@gmail.com> | 2021-03-26 16:14:09 +0900 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2021-11-19 07:57:02 +0100 |
| commit | 6fa2930573ff862a7f8ae8a11aa8bb7253fddeb7 (patch) | |
| tree | ff653eb83f687bb48ed479c6ba5106ea59c0fec4 /tests/queries/test_query.py | |
| parent | 5e218cc0b704ebf64c460050a97b5fafe63e92b0 (diff) | |
Refs #24121 -- Added __repr__() to BaseDatabaseWrapper, JoinPromoter, and SQLCompiler.
Diffstat (limited to 'tests/queries/test_query.py')
| -rw-r--r-- | tests/queries/test_query.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/queries/test_query.py b/tests/queries/test_query.py index 523fa607f0..6ed766e3ae 100644 --- a/tests/queries/test_query.py +++ b/tests/queries/test_query.py @@ -6,7 +6,7 @@ from django.db.models.expressions import Col, Func from django.db.models.fields.related_lookups import RelatedIsNull from django.db.models.functions import Lower from django.db.models.lookups import Exact, GreaterThan, IsNull, LessThan -from django.db.models.sql.query import Query +from django.db.models.sql.query import JoinPromoter, Query from django.db.models.sql.where import OR from django.test import SimpleTestCase from django.test.utils import register_lookup @@ -150,3 +150,11 @@ class TestQuery(SimpleTestCase): msg = 'Cannot filter against a non-conditional expression.' with self.assertRaisesMessage(TypeError, msg): query.build_where(Func(output_field=CharField())) + + +class JoinPromoterTest(SimpleTestCase): + def test_repr(self): + self.assertEqual( + repr(JoinPromoter('AND', 3, True)), + "JoinPromoter(connector='AND', num_children=3, negated=True)", + ) |
