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