@@ -102,6 +102,7 @@ class DatabaseFeatures(BaseDatabaseFeatures):
102
102
"ordering.tests.OrderingTests.test_order_by_ptr_field_with_default_ordering_by_expression" ,
103
103
# alias().order_by() doesn't work.
104
104
"annotations.tests.AliasTests.test_order_by_alias" ,
105
+ "annotations.tests.AliasTests.test_order_by_alias_aggregate" ,
105
106
# annotate() + values_list() + order_by() loses annotated value.
106
107
"expressions_case.tests.CaseExpressionTests.test_annotate_values_not_in_order_by" ,
107
108
# Querying the reverse side of a foreign key for None returns no
@@ -274,25 +275,6 @@ def django_test_expected_failures(self):
274
275
"timezones.tests.NewDatabaseTests.test_query_aggregation" ,
275
276
"timezones.tests.NewDatabaseTests.test_query_annotation" ,
276
277
},
277
- "QuerySet.annotate() has some limitations." : {
278
- # Invalid $project :: caused by :: Unknown expression $count,
279
- "annotations.tests.NonAggregateAnnotationTestCase.test_combined_expression_annotation_with_aggregation" ,
280
- "annotations.tests.NonAggregateAnnotationTestCase.test_combined_f_expression_annotation_with_aggregation" ,
281
- "annotations.tests.NonAggregateAnnotationTestCase.test_full_expression_annotation_with_aggregation" ,
282
- "annotations.tests.NonAggregateAnnotationTestCase.test_grouping_by_q_expression_annotation" ,
283
- "annotations.tests.NonAggregateAnnotationTestCase.test_order_by_aggregate" ,
284
- "annotations.tests.NonAggregateAnnotationTestCase.test_q_expression_annotation_with_aggregation" ,
285
- "defer_regress.tests.DeferRegressionTest.test_basic" ,
286
- "defer_regress.tests.DeferRegressionTest.test_defer_annotate_select_related" ,
287
- "defer_regress.tests.DeferRegressionTest.test_ticket_16409" ,
288
- "expressions.tests.BasicExpressionsTests.test_aggregate_subquery_annotation" ,
289
- "expressions.tests.FieldTransformTests.test_month_aggregation" ,
290
- "expressions_case.tests.CaseDocumentationExamples.test_conditional_aggregation_example" ,
291
- "model_fields.test_jsonfield.TestQuerying.test_ordering_grouping_by_count" ,
292
- # Func not implemented.
293
- "annotations.tests.NonAggregateAnnotationTestCase.test_custom_functions" ,
294
- "annotations.tests.NonAggregateAnnotationTestCase.test_custom_functions_can_ref_other_functions" ,
295
- },
296
278
"Exists is not supported on MongoDB." : {
297
279
"annotations.tests.NonAggregateAnnotationTestCase.test_annotation_exists_none_query" ,
298
280
"expressions.tests.BasicExpressionsTests.test_annotation_with_deeply_nested_outerref" ,
@@ -354,12 +336,26 @@ def django_test_expected_failures(self):
354
336
"one_to_one.tests.OneToOneTests.test_get_prefetch_queryset_warning" ,
355
337
"one_to_one.tests.OneToOneTests.test_rel_pk_subquery" ,
356
338
},
357
- "Count doesn't work in QuerySet.annotate()" : {
339
+ # Invalid $project :: caused by :: Unknown expression $count
340
+ # https://github.com/mongodb-labs/django-mongodb/issues/79
341
+ "Count() in QuerySet.annotate() crashes." : {
358
342
"annotations.tests.AliasTests.test_alias_annotate_with_aggregation" ,
359
- "annotations.tests.AliasTests.test_order_by_alias_aggregate" ,
360
343
"annotations.tests.NonAggregateAnnotationTestCase.test_annotate_exists" ,
361
344
"annotations.tests.NonAggregateAnnotationTestCase.test_annotate_with_aggregation" ,
345
+ "annotations.tests.NonAggregateAnnotationTestCase.test_combined_expression_annotation_with_aggregation" ,
346
+ "annotations.tests.NonAggregateAnnotationTestCase.test_combined_f_expression_annotation_with_aggregation" ,
347
+ "annotations.tests.NonAggregateAnnotationTestCase.test_full_expression_annotation_with_aggregation" ,
348
+ "annotations.tests.NonAggregateAnnotationTestCase.test_grouping_by_q_expression_annotation" ,
349
+ "annotations.tests.NonAggregateAnnotationTestCase.test_order_by_aggregate" ,
350
+ "annotations.tests.NonAggregateAnnotationTestCase.test_q_expression_annotation_with_aggregation" ,
362
351
"db_functions.comparison.test_cast.CastTests.test_cast_from_db_datetime_to_date_group_by" ,
352
+ "defer_regress.tests.DeferRegressionTest.test_basic" ,
353
+ "defer_regress.tests.DeferRegressionTest.test_defer_annotate_select_related" ,
354
+ "defer_regress.tests.DeferRegressionTest.test_ticket_16409" ,
355
+ "expressions.tests.BasicExpressionsTests.test_aggregate_subquery_annotation" ,
356
+ "expressions.tests.FieldTransformTests.test_month_aggregation" ,
357
+ "expressions_case.tests.CaseDocumentationExamples.test_conditional_aggregation_example" ,
358
+ "model_fields.test_jsonfield.TestQuerying.test_ordering_grouping_by_count" ,
363
359
},
364
360
"Cannot use QuerySet.delete() when querying across multiple collections on MongoDB." : {
365
361
"one_to_one.tests.OneToOneTests.test_o2o_primary_key_delete" ,
@@ -417,6 +413,10 @@ def django_test_expected_failures(self):
417
413
"timezones.tests.NewDatabaseTests.test_cursor_explicit_time_zone" ,
418
414
"timezones.tests.NewDatabaseTests.test_raw_sql" ,
419
415
},
416
+ "Custom functions with SQL don't work on MongoDB." : {
417
+ "annotations.tests.NonAggregateAnnotationTestCase.test_custom_functions" ,
418
+ "annotations.tests.NonAggregateAnnotationTestCase.test_custom_functions_can_ref_other_functions" ,
419
+ },
420
420
"Bilateral transform not implemented." : {
421
421
"db_functions.tests.FunctionTests.test_func_transform_bilateral" ,
422
422
"db_functions.tests.FunctionTests.test_func_transform_bilateral_multivalue" ,
0 commit comments