Skip to content

Commit 44b1197

Browse files
committed
Clean up.
1 parent 069ddab commit 44b1197

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

django_mongodb/features.py

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ class DatabaseFeatures(BaseDatabaseFeatures):
4848
"lookup.tests.LookupTests.test_pattern_lookups_with_substr",
4949
# Querying ObjectID with string doesn't work.
5050
"lookup.tests.LookupTests.test_lookup_int_as_str",
51+
"model_fields.test_jsonfield.TestQuerying.test_icontains"
5152
# MongoDB gives the wrong result of log(number, base) when base is a
5253
# fractional Decimal: https://jira.mongodb.org/browse/SERVER-91223
5354
"db_functions.math.test_log.LogTests.test_decimal",
@@ -63,6 +64,10 @@ class DatabaseFeatures(BaseDatabaseFeatures):
6364
"model_fields.test_jsonfield.TestQuerying.test_usage_in_subquery",
6465
# Length of null considered zero rather than null.
6566
"db_functions.text.test_length.LengthTests.test_basic",
67+
# Django-mongo does not differentiate well between joins and key transforms.
68+
"model_fields.test_jsonfield.TestQuerying.test_order_grouping_custom_decoder",
69+
"model_fields.test_jsonfield.TestQuerying.test_ordering_by_transform",
70+
"model_fields.test_jsonfield.TestQuerying.test_ordering_grouping_by_key_transform",
6671
}
6772
# $bitAnd, #bitOr, and $bitXor are new in MongoDB 6.3.
6873
_django_test_expected_failures_bitwise = {
@@ -229,6 +234,8 @@ def django_test_expected_failures(self):
229234
"db_functions.datetime.test_extract_trunc.DateFunctionTests.test_trunc_subquery_with_parameters",
230235
"expressions_case.tests.CaseExpressionTests.test_in_subquery",
231236
"lookup.tests.LookupQueryingTests.test_filter_subquery_lhs",
237+
"model_fields.test_jsonfield.TestQuerying.test_nested_key_transform_on_subquery",
238+
"model_fields.test_jsonfield.TestQuerying.test_obj_subquery_lookup",
232239
# Invalid $project :: caused by :: Unknown expression $count,
233240
"annotations.tests.NonAggregateAnnotationTestCase.test_combined_expression_annotation_with_aggregation",
234241
"annotations.tests.NonAggregateAnnotationTestCase.test_combined_f_expression_annotation_with_aggregation",
@@ -250,7 +257,7 @@ def django_test_expected_failures(self):
250257
"expressions_case.tests.CaseExpressionTests.test_order_by_conditional_implicit",
251258
# annotate().filter().count() gives incorrect results.
252259
"db_functions.datetime.test_extract_trunc.DateFunctionTests.test_extract_year_exact_lookup",
253-
"model_fields.test_jsonfield.TestQuerying.test_nested_key_transform_on_subquery",
260+
# FieldDoesNotExist with ordering.
254261
"model_fields.test_jsonfield.TestQuerying.test_ordering_grouping_by_count",
255262
"model_fields.test_jsonfield.TestQuerying.test_obj_subquery_lookup",
256263
},
@@ -336,6 +343,7 @@ def django_test_expected_failures(self):
336343
"lookup.tests.LookupTests.test_lookup_rhs",
337344
"lookup.tests.LookupTests.test_isnull_non_boolean_value",
338345
"model_fields.test_manytomanyfield.ManyToManyFieldDBTests.test_value_from_object_instance_with_pk",
346+
"model_fields.test_jsonfield.TestQuerying.test_join_key_transform_annotation_expression",
339347
"model_fields.test_uuid.TestAsPrimaryKey.test_two_level_foreign_keys",
340348
"timezones.tests.LegacyDatabaseTests.test_query_annotation",
341349
"timezones.tests.NewDatabaseTests.test_query_annotation",
@@ -347,10 +355,6 @@ def django_test_expected_failures(self):
347355
"update.tests.SimpleTest.test_empty_update_with_inheritance",
348356
"update.tests.SimpleTest.test_foreign_key_update_with_id",
349357
"update.tests.SimpleTest.test_nonempty_update_with_inheritance",
350-
"model_fields.test_jsonfield.TestQuerying.test_join_key_transform_annotation_expression",
351-
"model_fields.test_jsonfield.TestQuerying.test_order_grouping_custom_decoder",
352-
"model_fields.test_jsonfield.TestQuerying.test_ordering_by_transform",
353-
"model_fields.test_jsonfield.TestQuerying.test_ordering_grouping_by_key_transform",
354358
},
355359
"Test inspects query for SQL": {
356360
"lookup.tests.LookupTests.test_in_ignore_none",
@@ -431,9 +435,4 @@ def django_test_expected_failures(self):
431435
"model_fields.test_jsonfield.TestQuerying.test_none_key",
432436
"model_fields.test_jsonfield.TestQuerying.test_none_key_exclude",
433437
},
434-
"Pipeline filtering": {"model_fields.test_jsonfield.TestQuerying.test_icontains"},
435438
}
436-
437-
@cached_property
438-
def is_mongodb_6_3(self):
439-
return self.connection.get_database_version() >= (6, 3)

0 commit comments

Comments
 (0)