diff --git a/tests/queries/tests.py b/tests/queries/tests.py index e58f05c4e5..ebc8b525df 100644 --- a/tests/queries/tests.py +++ b/tests/queries/tests.py @@ -2488,6 +2488,13 @@ class EmptyStringsAsNullTest(TestCase): [self.nc.pk], attrgetter('pk') ) + def test_21001(self): + foo = NamedCategory.objects.create(name='foo') + self.assertQuerysetEqual( + NamedCategory.objects.exclude(name=''), + [foo.pk], attrgetter('pk') + ) + class ProxyQueryCleanupTest(TestCase): def test_evaluated_proxy_count(self): """