@@ -48,8 +48,6 @@ class DatabaseFeatures(BaseDatabaseFeatures):
48
48
"aggregation.tests.AggregateTestCase.test_order_by_aggregate_transform" ,
49
49
# 'NulledTransform' object has no attribute 'as_mql'.
50
50
"lookup.tests.LookupTests.test_exact_none_transform" ,
51
- # "Save with update_fields did not affect any rows."
52
- "basic.tests.SelectOnSaveTests.test_select_on_save_lying_update" ,
53
51
# BaseExpression.convert_value() crashes with Decimal128.
54
52
"aggregation.tests.AggregateTestCase.test_combine_different_types" ,
55
53
"annotations.tests.NonAggregateAnnotationTestCase.test_combined_f_expression_annotation_with_aggregation" ,
@@ -84,8 +82,6 @@ class DatabaseFeatures(BaseDatabaseFeatures):
84
82
# Value.as_mql() doesn't call output_field.get_db_prep_save():
85
83
# https://github.com/mongodb/django-mongodb-backend/issues/282
86
84
"model_fields.test_jsonfield.TestSaveLoad.test_bulk_update_custom_get_prep_value" ,
87
- # to debug
88
- "transactions.tests.AtomicMiscTests.test_mark_for_rollback_on_error_in_transaction" ,
89
85
}
90
86
# $bitAnd, #bitOr, and $bitXor are new in MongoDB 6.3.
91
87
_django_test_expected_failures_bitwise = {
@@ -96,11 +92,32 @@ class DatabaseFeatures(BaseDatabaseFeatures):
96
92
"expressions.tests.ExpressionOperatorTests.test_lefthand_bitwise_xor_right_null" ,
97
93
"expressions.tests.ExpressionOperatorTests.test_lefthand_transformed_field_bitwise_or" ,
98
94
}
95
+ _django_test_expected_failures_no_transactions = {
96
+ # "Save with update_fields did not affect any rows." instead of
97
+ # "An error occurred in the current transaction. You can't execute
98
+ # queries until the end of the 'atomic' block."
99
+ "basic.tests.SelectOnSaveTests.test_select_on_save_lying_update" ,
100
+ }
99
101
_django_test_expected_failures_transactions = {
100
102
# When update_or_create() fails with IntegrityError, the transaction
101
103
# is no longer usable.
102
104
"get_or_create.tests.UpdateOrCreateTests.test_manual_primary_key_test" ,
103
105
"get_or_create.tests.UpdateOrCreateTestsWithManualPKs.test_create_with_duplicate_primary_key" ,
106
+ # Tests that require savepoints
107
+ "admin_views.tests.AdminViewBasicTest.test_disallowed_to_field" ,
108
+ "admin_views.tests.AdminViewPermissionsTest.test_add_view" ,
109
+ "admin_views.tests.AdminViewPermissionsTest.test_change_view" ,
110
+ "admin_views.tests.AdminViewPermissionsTest.test_change_view_save_as_new" ,
111
+ "admin_views.tests.AdminViewPermissionsTest.test_delete_view" ,
112
+ "auth_tests.test_views.ChangelistTests.test_view_user_password_is_readonly" ,
113
+ "get_or_create.tests.GetOrCreateTests.test_get_or_create_invalid_params" ,
114
+ "get_or_create.tests.UpdateOrCreateTests.test_integrity" ,
115
+ "many_to_many.tests.ManyToManyTests.test_add" ,
116
+ "many_to_one.tests.ManyToOneTests.test_fk_assignment_and_related_object_cache" ,
117
+ "model_fields.test_booleanfield.BooleanFieldTests.test_null_default" ,
118
+ "model_fields.test_floatfield.TestFloatField.test_float_validates_object" ,
119
+ "multiple_database.tests.QueryTestCase.test_generic_key_cross_database_protection" ,
120
+ "multiple_database.tests.QueryTestCase.test_m2m_cross_database_protection" ,
104
121
}
105
122
106
123
@cached_property
@@ -111,6 +128,8 @@ def django_test_expected_failures(self):
111
128
expected_failures .update (self ._django_test_expected_failures_bitwise )
112
129
if self .supports_transactions :
113
130
expected_failures .update (self ._django_test_expected_failures_transactions )
131
+ else :
132
+ expected_failures .update (self ._django_test_expected_failures_no_transactions )
114
133
return expected_failures
115
134
116
135
django_test_skips = {
0 commit comments