@@ -38,6 +38,9 @@ class DatabaseFeatures(BaseDatabaseFeatures):
38
38
"expressions.tests.NegatedExpressionTests.test_filter" ,
39
39
"expressions_case.tests.CaseExpressionTests.test_order_by_conditional_implicit" ,
40
40
# NotSupportedError: order_by() expression not supported.
41
+ # Lookup in order_by() not supported:
42
+ # argument of type '<database function>' is not iterable
43
+ "aggregation.tests.AggregateTestCase.test_aggregation_order_by_not_selected_annotation_values" ,
41
44
"db_functions.comparison.test_coalesce.CoalesceTests.test_ordering" ,
42
45
"db_functions.tests.FunctionTests.test_nested_function_ordering" ,
43
46
"db_functions.text.test_length.LengthTests.test_ordering" ,
@@ -104,6 +107,13 @@ class DatabaseFeatures(BaseDatabaseFeatures):
104
107
"queries.test_explain.ExplainUnsupportedTests.test_message" ,
105
108
# filter() on related model + update() doesn't work.
106
109
"queries.tests.Queries5Tests.test_ticket9848" ,
110
+ # Variance is not implemented in mongo as an aggregation,
111
+ # we should transform it into StdDev * 2.
112
+ "aggregation.test_filter_argument.FilteredAggregateTests.test_filtered_numerical_aggregates" ,
113
+ # Sum returns 0 instead of None in mongodb.
114
+ "aggregation.test_filter_argument.FilteredAggregateTests.test_plain_annotate" ,
115
+ "aggregation.tests.AggregateTestCase.test_annotation_expressions" ,
116
+ "aggregation.tests.AggregateTestCase.test_reverse_fkey_annotate" ,
107
117
}
108
118
# $bitAnd, #bitOr, and $bitXor are new in MongoDB 6.3.
109
119
_django_test_expected_failures_bitwise = {
@@ -279,6 +289,7 @@ def django_test_expected_failures(self):
279
289
"timezones.tests.NewDatabaseTests.test_query_annotation" ,
280
290
},
281
291
"Exists is not supported on MongoDB." : {
292
+ "aggregation.test_filter_argument.FilteredAggregateTests.test_filtered_aggregate_ref_multiple_subquery_annotation" ,
282
293
"annotations.tests.NonAggregateAnnotationTestCase.test_annotation_exists_none_query" ,
283
294
"delete_regress.tests.DeleteTests.test_self_reference_with_through_m2m_at_second_level" ,
284
295
"expressions.tests.BasicExpressionsTests.test_annotation_with_deeply_nested_outerref" ,
@@ -323,6 +334,14 @@ def django_test_expected_failures(self):
323
334
"queries.tests.Ticket22429Tests.test_ticket_22429" ,
324
335
},
325
336
"Subquery is not supported on MongoDB." : {
337
+ "aggregation.tests.AggregateAnnotationPruningTests.test_referenced_composed_subquery_requires_wrapping" ,
338
+ "aggregation.tests.AggregateAnnotationPruningTests.test_referenced_subquery_requires_wrapping" ,
339
+ "aggregation.tests.AggregateTestCase.test_aggregation_nested_subquery_outerref" ,
340
+ "aggregation.tests.AggregateTestCase.test_aggregation_subquery_annotation" ,
341
+ "aggregation.tests.AggregateTestCase.test_aggregation_subquery_annotation_multivalued" ,
342
+ "aggregation.tests.AggregateTestCase.test_aggregation_subquery_annotation_related_field" ,
343
+ "aggregation.tests.AggregateTestCase.test_aggregation_subquery_annotation_values" ,
344
+ "aggregation.tests.AggregateTestCase.test_aggregation_subquery_annotation_values_collision" ,
326
345
"annotations.tests.NonAggregateAnnotationTestCase.test_annotation_filter_with_subquery" ,
327
346
"annotations.tests.NonAggregateAnnotationTestCase.test_annotation_subquery_outerref_transform" ,
328
347
"annotations.tests.NonAggregateAnnotationTestCase.test_empty_queryset_annotation" ,
@@ -499,6 +518,7 @@ def django_test_expected_failures(self):
499
518
"queries.tests.Queries6Tests.test_col_alias_quoted" ,
500
519
},
501
520
"Test executes raw SQL." : {
521
+ "aggregation.tests.AggregateTestCase.test_coalesced_empty_result_set" ,
502
522
"annotations.tests.NonAggregateAnnotationTestCase.test_raw_sql_with_inherited_field" ,
503
523
"delete_regress.tests.DeleteLockingTest.test_concurrent_delete" ,
504
524
"expressions.tests.BasicExpressionsTests.test_annotate_values_filter" ,
@@ -590,6 +610,7 @@ def django_test_expected_failures(self):
590
610
"model_fields.test_jsonfield.TestQuerying.test_none_key_exclude" ,
591
611
},
592
612
"Randomized ordering isn't supported by MongoDB." : {
613
+ "aggregation.tests.AggregateTestCase.test_aggregation_random_ordering" ,
593
614
"ordering.tests.OrderingTests.test_random_ordering" ,
594
615
},
595
616
"Queries without a collection aren't supported on MongoDB." : {
@@ -605,6 +626,7 @@ def django_test_expected_failures(self):
605
626
"aggregation.tests.AggregateAnnotationPruningTests.test_non_aggregate_annotation_pruned" ,
606
627
"aggregation.tests.AggregateTestCase.test_add_implementation" ,
607
628
"aggregation.tests.AggregateTestCase.test_aggregation_default_using_datetime_from_database" ,
629
+ "aggregation.tests.AggregateTestCase.test_multi_arg_aggregate" ,
608
630
# SQL custom values.
609
631
"aggregation.tests.AggregateTestCase.test_aggregation_default_using_date_from_database" ,
610
632
# No sql generate
@@ -616,7 +638,17 @@ def django_test_expected_failures(self):
616
638
"aggregation.tests.AggregateAnnotationPruningTests.test_referenced_aggregate_annotation_kept" ,
617
639
# Using a QuerySet in annotate() is not supported on MongoDB
618
640
"aggregation.tests.AggregateTestCase.test_group_by_subquery_annotation" ,
619
- }
641
+ # Query set with annotate not supported.
642
+ "aggregation.tests.AggregateTestCase.test_group_by_reference_subquery" ,
643
+ "aggregation.tests.AggregateTestCase.test_filter_in_subquery_or_aggregation" ,
644
+ # Exists is not supported in mongodb
645
+ "aggregation.tests.AggregateTestCase.test_aggregation_exists_multivalued_outeref" ,
646
+ "aggregation.tests.AggregateTestCase.test_group_by_exists_annotation" ,
647
+ "aggregation.tests.AggregateTestCase.test_exists_none_with_aggregate" ,
648
+ "aggregation.tests.AggregateTestCase.test_exists_extra_where_with_aggregate" ,
649
+ # Queryset dates not supported
650
+ "aggregation.tests.AggregateTestCase.test_dates_with_aggregation" ,
651
+ },
620
652
}
621
653
622
654
@cached_property
0 commit comments