@@ -245,9 +245,11 @@ def test_time(self):
245245class QueryTests (EncryptionTestCase ):
246246 def test_aggregate (self ):
247247 msg = (
248- "Aggregation stage $internalFacetTeeConsumer is not allowed or "
249- "supported with automatic encryption. "
248+ 'csfle "analyze_query" failed: Missing encryption schema for '
249+ "namespace: test_django_encrypted.$cmd.aggregate "
250250 )
251+ IntegerModel .objects .create (value = 1 )
252+ IntegerModel .objects .create (value = 3 )
251253 with self .assertRaisesMessage (DatabaseError , msg ):
252254 list (IntegerModel .objects .aggregate (Avg ("value" )))
253255
@@ -291,12 +293,14 @@ def test_contains(self):
291293 self .assertIs (CharModel .objects .contains (obj ), True )
292294
293295 def test_count (self ):
296+ CharModel .objects .create (value = "a" )
297+ CharModel .objects .create (value = "b" )
294298 msg = (
295- "Aggregation stage $internalFacetTeeConsumer is not allowed or "
296- "supported with automatic encryption. "
299+ 'csfle "analyze_query" failed: Missing encryption schema for '
300+ "namespace: test_django_encrypted.$cmd.aggregate "
297301 )
298302 with self .assertRaisesMessage (DatabaseError , msg ):
299- list (CharModel .objects .count ())
303+ self . assertEqual (CharModel .objects .count (), 2 )
300304
301305 def test_dates (self ):
302306 msg = (
0 commit comments