Skip to content

Commit 4881d5a

Browse files
committed
add many-to-many/foreign key test apps to CI
1 parent 12f3722 commit 4881d5a

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-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: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ 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",
7275
}
@@ -113,6 +116,12 @@ def django_test_expected_failures(self):
113116
"QuerySet.prefetch_related() is not supported on MongoDB.": {
114117
"m2m_through_regress.test_multitable.MultiTableTests.test_m2m_prefetch_proxied",
115118
"m2m_through_regress.test_multitable.MultiTableTests.test_m2m_prefetch_reverse_proxied",
119+
"many_to_many.tests.ManyToManyTests.test_add_after_prefetch",
120+
"many_to_many.tests.ManyToManyTests.test_add_then_remove_after_prefetch",
121+
"many_to_many.tests.ManyToManyTests.test_clear_after_prefetch",
122+
"many_to_many.tests.ManyToManyTests.test_create_after_prefetch",
123+
"many_to_many.tests.ManyToManyTests.test_remove_after_prefetch",
124+
"many_to_many.tests.ManyToManyTests.test_set_after_prefetch",
116125
"model_forms.tests.OtherModelFormTests.test_prefetch_related_queryset",
117126
},
118127
"QuerySet.update() with expression not supported.": {
@@ -184,6 +193,7 @@ def django_test_expected_failures(self):
184193
"lookup.tests.LookupTests.test_filter_by_reverse_related_field_transform",
185194
"lookup.tests.LookupTests.test_in_ignore_none_with_unhashable_items",
186195
"m2m_through_regress.tests.ThroughLoadDataTestCase.test_sequence_creation",
196+
"many_to_many.tests.ManyToManyTests.test_add_remove_invalid_type",
187197
"model_fields.test_autofield.AutoFieldTests",
188198
"model_fields.test_autofield.BigAutoFieldTests",
189199
"model_fields.test_autofield.SmallAutoFieldTests",
@@ -241,6 +251,7 @@ def django_test_expected_failures(self):
241251
"model_forms.tests.LimitChoicesToTests.test_limit_choices_to_callable_for_m2m_rel",
242252
"model_forms.tests.LimitChoicesToTests.test_limit_choices_to_m2m_through",
243253
"model_forms.tests.LimitChoicesToTests.test_limit_choices_to_no_duplicates",
254+
"null_queries.tests.NullQueriesTests.test_reverse_relations",
244255
"queries.tests.ExcludeTest17600.test_exclude_plain",
245256
"queries.tests.ExcludeTest17600.test_exclude_with_q_is_equal_to_plain_exclude_variation",
246257
"queries.tests.ExcludeTest17600.test_exclude_with_q_object_no_distinct",
@@ -331,6 +342,14 @@ def django_test_expected_failures(self):
331342
"lookup.tests.LookupTests.test_exact_sliced_queryset_limit_one",
332343
"lookup.tests.LookupTests.test_exact_sliced_queryset_limit_one_offset",
333344
"lookup.tests.LookupTests.test_in_different_database",
345+
"many_to_many.tests.ManyToManyTests.test_assign",
346+
"many_to_many.tests.ManyToManyTests.test_assign_ids",
347+
"many_to_many.tests.ManyToManyTests.test_clear",
348+
"many_to_many.tests.ManyToManyTests.test_remove",
349+
"many_to_many.tests.ManyToManyTests.test_reverse_assign_with_queryset",
350+
"many_to_many.tests.ManyToManyTests.test_set",
351+
"many_to_many.tests.ManyToManyTests.test_set_existing_different_type",
352+
"many_to_one.tests.ManyToOneTests.test_get_prefetch_queryset_reverse_warning",
334353
"model_fields.test_jsonfield.TestQuerying.test_usage_in_subquery",
335354
"one_to_one.tests.OneToOneTests.test_get_prefetch_queryset_warning",
336355
"one_to_one.tests.OneToOneTests.test_rel_pk_subquery",
@@ -378,6 +397,7 @@ def django_test_expected_failures(self):
378397
"aggregation_regress.tests.AggregationTests.test_more_more_more2",
379398
"dates.tests.DatesTests.test_dates_trunc_datetime_fields",
380399
"dates.tests.DatesTests.test_related_model_traverse",
400+
"many_to_one.tests.ManyToOneTests.test_select_related",
381401
},
382402
"QuerySet.datetimes() is not supported on MongoDB.": {
383403
"annotations.tests.AliasTests.test_datetimes_alias",
@@ -397,6 +417,9 @@ def django_test_expected_failures(self):
397417
"aggregation_regress.tests.AggregationTests.test_conditional_aggregate_on_complex_condition",
398418
"aggregation_regress.tests.AggregationTests.test_distinct_conditional_aggregate",
399419
"lookup.tests.LookupTests.test_lookup_collision_distinct",
420+
"many_to_many.tests.ManyToManyTests.test_reverse_selects",
421+
"many_to_many.tests.ManyToManyTests.test_selects",
422+
"many_to_one.tests.ManyToOneTests.test_reverse_selects",
400423
"ordering.tests.OrderingTests.test_orders_nulls_first_on_filtered_subquery",
401424
"queries.tests.ExcludeTest17600.test_exclude_plain_distinct",
402425
"queries.tests.ExcludeTest17600.test_exclude_with_q_is_equal_to_plain_exclude",

0 commit comments

Comments
 (0)