Fixed #24747 -- Allowed transforms in QuerySet.order_by() and distinct(*fields).

This commit is contained in:
Matthew Wilkes 2017-06-18 16:53:40 +01:00 committed by Tim Graham
parent bf26f66029
commit 2162f0983d
15 changed files with 260 additions and 38 deletions

View file

@ -17,7 +17,7 @@ class DatabaseOperationTests(SimpleTestCase):
def test_distinct_on_fields(self):
msg = 'DISTINCT ON fields is not supported by this database backend'
with self.assertRaisesMessage(NotSupportedError, msg):
self.ops.distinct_sql(['a', 'b'])
self.ops.distinct_sql(['a', 'b'], None)
def test_deferrable_sql(self):
self.assertEqual(self.ops.deferrable_sql(), '')