@@ -34,6 +34,7 @@ class DatabaseFeatures(BaseDatabaseFeatures):
34
34
"basic.tests.SelectOnSaveTests.test_select_on_save_lying_update" ,
35
35
# Lookup in order_by() not supported:
36
36
# argument of type '<database function>' is not iterable
37
+ "aggregation.tests.AggregateTestCase.test_aggregation_order_by_not_selected_annotation_values" ,
37
38
"db_functions.comparison.test_coalesce.CoalesceTests.test_ordering" ,
38
39
"db_functions.tests.FunctionTests.test_nested_function_ordering" ,
39
40
"db_functions.text.test_length.LengthTests.test_ordering" ,
@@ -137,6 +138,13 @@ class DatabaseFeatures(BaseDatabaseFeatures):
137
138
# QuerySet.explain() not implemented:
138
139
# https://github.com/mongodb-labs/django-mongodb/issues/28
139
140
"queries.test_explain.ExplainUnsupportedTests.test_message" ,
141
+ # Variance is not implemented in mongo as an aggregation,
142
+ # we should transform it into StdDev * 2.
143
+ "aggregation.test_filter_argument.FilteredAggregateTests.test_filtered_numerical_aggregates" ,
144
+ # Sum returns 0 instead of None in mongodb.
145
+ "aggregation.test_filter_argument.FilteredAggregateTests.test_plain_annotate" ,
146
+ "aggregation.tests.AggregateTestCase.test_annotation_expressions" ,
147
+ "aggregation.tests.AggregateTestCase.test_reverse_fkey_annotate" ,
140
148
}
141
149
# $bitAnd, #bitOr, and $bitXor are new in MongoDB 6.3.
142
150
_django_test_expected_failures_bitwise = {
@@ -312,6 +320,7 @@ def django_test_expected_failures(self):
312
320
"timezones.tests.NewDatabaseTests.test_query_annotation" ,
313
321
},
314
322
"Exists is not supported on MongoDB." : {
323
+ "aggregation.test_filter_argument.FilteredAggregateTests.test_filtered_aggregate_ref_multiple_subquery_annotation" ,
315
324
"annotations.tests.NonAggregateAnnotationTestCase.test_annotation_exists_none_query" ,
316
325
"delete_regress.tests.DeleteTests.test_self_reference_with_through_m2m_at_second_level" ,
317
326
"expressions.tests.BasicExpressionsTests.test_annotation_with_deeply_nested_outerref" ,
@@ -355,6 +364,14 @@ def django_test_expected_failures(self):
355
364
"queries.tests.Ticket22429Tests.test_ticket_22429" ,
356
365
},
357
366
"Subquery is not supported on MongoDB." : {
367
+ "aggregation.tests.AggregateAnnotationPruningTests.test_referenced_composed_subquery_requires_wrapping" ,
368
+ "aggregation.tests.AggregateAnnotationPruningTests.test_referenced_subquery_requires_wrapping" ,
369
+ "aggregation.tests.AggregateTestCase.test_aggregation_nested_subquery_outerref" ,
370
+ "aggregation.tests.AggregateTestCase.test_aggregation_subquery_annotation" ,
371
+ "aggregation.tests.AggregateTestCase.test_aggregation_subquery_annotation_multivalued" ,
372
+ "aggregation.tests.AggregateTestCase.test_aggregation_subquery_annotation_related_field" ,
373
+ "aggregation.tests.AggregateTestCase.test_aggregation_subquery_annotation_values" ,
374
+ "aggregation.tests.AggregateTestCase.test_aggregation_subquery_annotation_values_collision" ,
358
375
"annotations.tests.NonAggregateAnnotationTestCase.test_annotation_filter_with_subquery" ,
359
376
"annotations.tests.NonAggregateAnnotationTestCase.test_annotation_subquery_outerref_transform" ,
360
377
"annotations.tests.NonAggregateAnnotationTestCase.test_empty_queryset_annotation" ,
@@ -525,6 +542,7 @@ def django_test_expected_failures(self):
525
542
"queries.tests.Queries6Tests.test_col_alias_quoted" ,
526
543
},
527
544
"Test executes raw SQL." : {
545
+ "aggregation.tests.AggregateTestCase.test_coalesced_empty_result_set" ,
528
546
"annotations.tests.NonAggregateAnnotationTestCase.test_raw_sql_with_inherited_field" ,
529
547
"delete_regress.tests.DeleteLockingTest.test_concurrent_delete" ,
530
548
"expressions.tests.BasicExpressionsTests.test_annotate_values_filter" ,
@@ -615,6 +633,7 @@ def django_test_expected_failures(self):
615
633
"model_fields.test_jsonfield.TestQuerying.test_none_key_exclude" ,
616
634
},
617
635
"Randomized ordering isn't supported by MongoDB." : {
636
+ "aggregation.tests.AggregateTestCase.test_aggregation_random_ordering" ,
618
637
"ordering.tests.OrderingTests.test_random_ordering" ,
619
638
},
620
639
# https://github.com/mongodb-labs/django-mongodb/issues/34
@@ -642,6 +661,7 @@ def django_test_expected_failures(self):
642
661
"aggregation.tests.AggregateAnnotationPruningTests.test_non_aggregate_annotation_pruned" ,
643
662
"aggregation.tests.AggregateTestCase.test_add_implementation" ,
644
663
"aggregation.tests.AggregateTestCase.test_aggregation_default_using_datetime_from_database" ,
664
+ "aggregation.tests.AggregateTestCase.test_multi_arg_aggregate" ,
645
665
# SQL custom values.
646
666
"aggregation.tests.AggregateTestCase.test_aggregation_default_using_date_from_database" ,
647
667
# No sql generate
@@ -653,7 +673,17 @@ def django_test_expected_failures(self):
653
673
"aggregation.tests.AggregateAnnotationPruningTests.test_referenced_aggregate_annotation_kept" ,
654
674
# Using a QuerySet in annotate() is not supported on MongoDB
655
675
"aggregation.tests.AggregateTestCase.test_group_by_subquery_annotation" ,
656
- }
676
+ # Query set with annotate not supported.
677
+ "aggregation.tests.AggregateTestCase.test_group_by_reference_subquery" ,
678
+ "aggregation.tests.AggregateTestCase.test_filter_in_subquery_or_aggregation" ,
679
+ # Exists is not supported in mongodb
680
+ "aggregation.tests.AggregateTestCase.test_aggregation_exists_multivalued_outeref" ,
681
+ "aggregation.tests.AggregateTestCase.test_group_by_exists_annotation" ,
682
+ "aggregation.tests.AggregateTestCase.test_exists_none_with_aggregate" ,
683
+ "aggregation.tests.AggregateTestCase.test_exists_extra_where_with_aggregate" ,
684
+ # Queryset dates not supported
685
+ "aggregation.tests.AggregateTestCase.test_dates_with_aggregation" ,
686
+ },
657
687
}
658
688
659
689
@cached_property
0 commit comments