From 82da72b74851808c08ec98fe609efe52609f29ad Mon Sep 17 00:00:00 2001 From: Mariusz Felisiak Date: Wed, 17 Jun 2020 10:32:43 +0200 Subject: Refs #28077 -- Added opclasses to Index.__repr__(). This also removes unnecessary commas between attributes. --- tests/model_indexes/tests.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/model_indexes/tests.py b/tests/model_indexes/tests.py index ff3c6c73c7..93ac47130a 100644 --- a/tests/model_indexes/tests.py +++ b/tests/model_indexes/tests.py @@ -22,12 +22,22 @@ class SimpleIndexesTests(SimpleTestCase): name='include_idx', include=['author', 'pages'], ) + opclasses_index = models.Index( + fields=['headline', 'body'], + name='opclasses_idx', + opclasses=['varchar_pattern_ops', 'text_pattern_ops'], + ) self.assertEqual(repr(index), "") self.assertEqual(repr(multi_col_index), "") - self.assertEqual(repr(partial_index), "") + self.assertEqual(repr(partial_index), "") self.assertEqual( repr(covering_index), - "", + "", + ) + self.assertEqual( + repr(opclasses_index), + "", ) def test_eq(self): -- cgit v1.3