Skip to content

Commit 12b65ce

Browse files
committed
reorganize QuerySet.annotate() test skips
1 parent 9bd5b59 commit 12b65ce

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

django_mongodb/features.py

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ class DatabaseFeatures(BaseDatabaseFeatures):
101101
"ordering.tests.OrderingTests.test_order_by_ptr_field_with_default_ordering_by_expression",
102102
# alias().order_by() doesn't work.
103103
"annotations.tests.AliasTests.test_order_by_alias",
104+
"annotations.tests.AliasTests.test_order_by_alias_aggregate",
104105
# annotate() + values_list() + order_by() loses annotated value.
105106
"expressions_case.tests.CaseExpressionTests.test_annotate_values_not_in_order_by",
106107
# Querying the reverse side of a foreign key for None returns no
@@ -273,25 +274,6 @@ def django_test_expected_failures(self):
273274
"timezones.tests.NewDatabaseTests.test_query_aggregation",
274275
"timezones.tests.NewDatabaseTests.test_query_annotation",
275276
},
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-
},
295277
"Exists is not supported on MongoDB.": {
296278
"annotations.tests.NonAggregateAnnotationTestCase.test_annotation_exists_none_query",
297279
"expressions.tests.BasicExpressionsTests.test_annotation_with_deeply_nested_outerref",
@@ -353,12 +335,26 @@ def django_test_expected_failures(self):
353335
"one_to_one.tests.OneToOneTests.test_get_prefetch_queryset_warning",
354336
"one_to_one.tests.OneToOneTests.test_rel_pk_subquery",
355337
},
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.": {
357341
"annotations.tests.AliasTests.test_alias_annotate_with_aggregation",
358-
"annotations.tests.AliasTests.test_order_by_alias_aggregate",
359342
"annotations.tests.NonAggregateAnnotationTestCase.test_annotate_exists",
360343
"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",
361350
"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",
362358
},
363359
"Cannot use QuerySet.delete() when querying across multiple collections on MongoDB.": {
364360
"one_to_one.tests.OneToOneTests.test_o2o_primary_key_delete",
@@ -417,6 +413,10 @@ def django_test_expected_failures(self):
417413
"timezones.tests.NewDatabaseTests.test_cursor_explicit_time_zone",
418414
"timezones.tests.NewDatabaseTests.test_raw_sql",
419415
},
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+
},
420420
"Bilateral transform not implemented.": {
421421
"db_functions.tests.FunctionTests.test_func_transform_bilateral",
422422
"db_functions.tests.FunctionTests.test_func_transform_bilateral_multivalue",

0 commit comments

Comments
 (0)