From 99d40c6f658ead97f67d331eed9278805c8a4007 Mon Sep 17 00:00:00 2001 From: Alex Wilson Date: Mon, 13 Apr 2015 18:57:11 -0400 Subject: Fixed #24277 -- Added exception when dict used in QuerySet filtering --- tests/queries/tests.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests') diff --git a/tests/queries/tests.py b/tests/queries/tests.py index 82d6d1fe7c..f688d0ed90 100644 --- a/tests/queries/tests.py +++ b/tests/queries/tests.py @@ -440,6 +440,10 @@ class Queries1Tests(BaseQuerysetTest): [''] ) + def test_error_raised_on_filter_with_dictionary(self): + with self.assertRaisesMessage(FieldError, 'Cannot parse keyword query as dict'): + Note.objects.filter({'note': 'n1', 'misc': 'foo'}) + def test_tickets_2076_7256(self): # Ordering on related tables should be possible, even if the table is # not otherwise involved. -- cgit v1.3