Skip to content

Commit 1180a6d

Browse files
committed
add many-to-many/foreign key tests apps to CI
1 parent 12f3722 commit 1180a6d

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

.github/workflows/test-python.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,16 @@ jobs:
9696
m2m_through
9797
m2m_through_regress
9898
m2o_recursive
99+
many_to_many
100+
many_to_one
101+
many_to_one_null
99102
model_fields
100103
model_forms
104+
mutually_referential
105+
nested_foreign_keys
106+
null_fk
107+
null_fk_ordering
108+
null_queries
101109
one_to_one
102110
ordering
103111
or_lookups

django_mongodb/features.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,13 @@ class DatabaseFeatures(BaseDatabaseFeatures):
6767
"aggregation_regress.tests.AggregationTests.test_annotation",
6868
"aggregation_regress.tests.AggregationTests.test_more_more3",
6969
"aggregation_regress.tests.AggregationTests.test_more_more_more3",
70+
# QuerySet.extra(where=...) should raise NotSupportedError instead of:
71+
# 'ExtraWhere' object has no attribute 'as_mql'.
72+
"many_to_one.tests.ManyToOneTests.test_selects",
7073
# Incorrect JOIN with GenericRelation gives incorrect results.
7174
"aggregation_regress.tests.AggregationTests.test_aggregation_with_generic_reverse_relation",
75+
# QuerySet.delete() with JOIN should raise NotSupportedError.
76+
"many_to_one.tests.ManyToOneTests.test_delete",
7277
}
7378
# $bitAnd, #bitOr, and $bitXor are new in MongoDB 6.3.
7479
_django_test_expected_failures_bitwise = {
@@ -113,6 +118,12 @@ def django_test_expected_failures(self):
113118
"QuerySet.prefetch_related() is not supported on MongoDB.": {
114119
"m2m_through_regress.test_multitable.MultiTableTests.test_m2m_prefetch_proxied",
115120
"m2m_through_regress.test_multitable.MultiTableTests.test_m2m_prefetch_reverse_proxied",
121+
"many_to_many.tests.ManyToManyTests.test_add_after_prefetch",
122+
"many_to_many.tests.ManyToManyTests.test_add_then_remove_after_prefetch",
123+
"many_to_many.tests.ManyToManyTests.test_clear_after_prefetch",
124+
"many_to_many.tests.ManyToManyTests.test_create_after_prefetch",
125+
"many_to_many.tests.ManyToManyTests.test_remove_after_prefetch",
126+
"many_to_many.tests.ManyToManyTests.test_set_after_prefetch",
116127
"model_forms.tests.OtherModelFormTests.test_prefetch_related_queryset",
117128
},
118129
"QuerySet.update() with expression not supported.": {
@@ -184,6 +195,7 @@ def django_test_expected_failures(self):
184195
"lookup.tests.LookupTests.test_filter_by_reverse_related_field_transform",
185196
"lookup.tests.LookupTests.test_in_ignore_none_with_unhashable_items",
186197
"m2m_through_regress.tests.ThroughLoadDataTestCase.test_sequence_creation",
198+
"many_to_many.tests.ManyToManyTests.test_add_remove_invalid_type",
187199
"model_fields.test_autofield.AutoFieldTests",
188200
"model_fields.test_autofield.BigAutoFieldTests",
189201
"model_fields.test_autofield.SmallAutoFieldTests",
@@ -241,6 +253,7 @@ def django_test_expected_failures(self):
241253
"model_forms.tests.LimitChoicesToTests.test_limit_choices_to_callable_for_m2m_rel",
242254
"model_forms.tests.LimitChoicesToTests.test_limit_choices_to_m2m_through",
243255
"model_forms.tests.LimitChoicesToTests.test_limit_choices_to_no_duplicates",
256+
"null_queries.tests.NullQueriesTests.test_reverse_relations",
244257
"queries.tests.ExcludeTest17600.test_exclude_plain",
245258
"queries.tests.ExcludeTest17600.test_exclude_with_q_is_equal_to_plain_exclude_variation",
246259
"queries.tests.ExcludeTest17600.test_exclude_with_q_object_no_distinct",
@@ -331,6 +344,14 @@ def django_test_expected_failures(self):
331344
"lookup.tests.LookupTests.test_exact_sliced_queryset_limit_one",
332345
"lookup.tests.LookupTests.test_exact_sliced_queryset_limit_one_offset",
333346
"lookup.tests.LookupTests.test_in_different_database",
347+
"many_to_many.tests.ManyToManyTests.test_assign",
348+
"many_to_many.tests.ManyToManyTests.test_assign_ids",
349+
"many_to_many.tests.ManyToManyTests.test_clear",
350+
"many_to_many.tests.ManyToManyTests.test_remove",
351+
"many_to_many.tests.ManyToManyTests.test_reverse_assign_with_queryset",
352+
"many_to_many.tests.ManyToManyTests.test_set",
353+
"many_to_many.tests.ManyToManyTests.test_set_existing_different_type",
354+
"many_to_one.tests.ManyToOneTests.test_get_prefetch_queryset_reverse_warning",
334355
"model_fields.test_jsonfield.TestQuerying.test_usage_in_subquery",
335356
"one_to_one.tests.OneToOneTests.test_get_prefetch_queryset_warning",
336357
"one_to_one.tests.OneToOneTests.test_rel_pk_subquery",
@@ -378,6 +399,7 @@ def django_test_expected_failures(self):
378399
"aggregation_regress.tests.AggregationTests.test_more_more_more2",
379400
"dates.tests.DatesTests.test_dates_trunc_datetime_fields",
380401
"dates.tests.DatesTests.test_related_model_traverse",
402+
"many_to_one.tests.ManyToOneTests.test_select_related",
381403
},
382404
"QuerySet.datetimes() is not supported on MongoDB.": {
383405
"annotations.tests.AliasTests.test_datetimes_alias",
@@ -397,6 +419,9 @@ def django_test_expected_failures(self):
397419
"aggregation_regress.tests.AggregationTests.test_conditional_aggregate_on_complex_condition",
398420
"aggregation_regress.tests.AggregationTests.test_distinct_conditional_aggregate",
399421
"lookup.tests.LookupTests.test_lookup_collision_distinct",
422+
"many_to_many.tests.ManyToManyTests.test_reverse_selects",
423+
"many_to_many.tests.ManyToManyTests.test_selects",
424+
"many_to_one.tests.ManyToOneTests.test_reverse_selects",
400425
"ordering.tests.OrderingTests.test_orders_nulls_first_on_filtered_subquery",
401426
"queries.tests.ExcludeTest17600.test_exclude_plain_distinct",
402427
"queries.tests.ExcludeTest17600.test_exclude_with_q_is_equal_to_plain_exclude",

0 commit comments

Comments
 (0)