diff --git a/tests/expressions/tests.py b/tests/expressions/tests.py index c20b88ff838..c22ff34ee81 100644 --- a/tests/expressions/tests.py +++ b/tests/expressions/tests.py @@ -70,6 +70,10 @@ class BasicExpressionsTests(TestCase): ['', '', ''], ) + def test_annotate_values_count(self): + companies = Company.objects.annotate(foo=RawSQL('%s', ['value'])) + self.assertEqual(companies.count(), 3) + @unittest.skipIf(connection.vendor == 'oracle', "Oracle doesn't support using boolean type in SELECT") def test_filtering_on_annotate_that_uses_q(self): self.assertEqual(