Skip to content

Commit 3862b9d

Browse files
committed
add many-to-many/foreign key tests apps to CI
1 parent bdd2a40 commit 3862b9d

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
@@ -95,7 +95,15 @@ jobs:
9595
m2m_through
9696
m2m_through_regress
9797
m2o_recursive
98+
many_to_many
99+
many_to_one
100+
many_to_one_null
98101
model_fields
102+
mutually_referential
103+
nested_foreign_keys
104+
null_fk
105+
null_fk_ordering
106+
null_queries
99107
one_to_one
100108
ordering
101109
or_lookups

django_mongodb/features.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@ class DatabaseFeatures(BaseDatabaseFeatures):
6161
"aggregation.tests.AggregateTestCase.test_aggregation_default_passed_another_aggregate",
6262
"aggregation.tests.AggregateTestCase.test_annotation_expressions",
6363
"aggregation.tests.AggregateTestCase.test_reverse_fkey_annotate",
64+
# QuerySet.extra(where=...) should raise NotSupportedError instead of:
65+
# 'ExtraWhere' object has no attribute 'as_mql'.
66+
"many_to_one.tests.ManyToOneTests.test_selects",
67+
# QuerySet.delete() with JOIN should raise NotSupportedError.
68+
"many_to_one.tests.ManyToOneTests.test_delete",
6469
}
6570
# $bitAnd, #bitOr, and $bitXor are new in MongoDB 6.3.
6671
_django_test_expected_failures_bitwise = {
@@ -105,6 +110,12 @@ def django_test_expected_failures(self):
105110
"QuerySet.prefetch_related() is not supported on MongoDB.": {
106111
"m2m_through_regress.test_multitable.MultiTableTests.test_m2m_prefetch_proxied",
107112
"m2m_through_regress.test_multitable.MultiTableTests.test_m2m_prefetch_reverse_proxied",
113+
"many_to_many.tests.ManyToManyTests.test_add_after_prefetch",
114+
"many_to_many.tests.ManyToManyTests.test_add_then_remove_after_prefetch",
115+
"many_to_many.tests.ManyToManyTests.test_clear_after_prefetch",
116+
"many_to_many.tests.ManyToManyTests.test_create_after_prefetch",
117+
"many_to_many.tests.ManyToManyTests.test_remove_after_prefetch",
118+
"many_to_many.tests.ManyToManyTests.test_set_after_prefetch",
108119
},
109120
"QuerySet.update() with expression not supported.": {
110121
"annotations.tests.AliasTests.test_update_with_alias",
@@ -175,6 +186,7 @@ def django_test_expected_failures(self):
175186
"lookup.tests.LookupTests.test_filter_by_reverse_related_field_transform",
176187
"lookup.tests.LookupTests.test_in_ignore_none_with_unhashable_items",
177188
"m2m_through_regress.tests.ThroughLoadDataTestCase.test_sequence_creation",
189+
"many_to_many.tests.ManyToManyTests.test_add_remove_invalid_type",
178190
"model_fields.test_autofield.AutoFieldTests",
179191
"model_fields.test_autofield.BigAutoFieldTests",
180192
"model_fields.test_autofield.SmallAutoFieldTests",
@@ -226,6 +238,7 @@ def django_test_expected_failures(self):
226238
"lookup.tests.LookupTests.test_exact_exists",
227239
"lookup.tests.LookupTests.test_nested_outerref_lhs",
228240
"lookup.tests.LookupQueryingTests.test_filter_exists_lhs",
241+
"null_queries.tests.NullQueriesTests.test_reverse_relations",
229242
"queries.tests.ExcludeTest17600.test_exclude_plain",
230243
"queries.tests.ExcludeTest17600.test_exclude_with_q_is_equal_to_plain_exclude_variation",
231244
"queries.tests.ExcludeTest17600.test_exclude_with_q_object_no_distinct",
@@ -309,6 +322,14 @@ def django_test_expected_failures(self):
309322
"lookup.tests.LookupTests.test_exact_sliced_queryset_limit_one",
310323
"lookup.tests.LookupTests.test_exact_sliced_queryset_limit_one_offset",
311324
"lookup.tests.LookupTests.test_in_different_database",
325+
"many_to_many.tests.ManyToManyTests.test_assign",
326+
"many_to_many.tests.ManyToManyTests.test_assign_ids",
327+
"many_to_many.tests.ManyToManyTests.test_clear",
328+
"many_to_many.tests.ManyToManyTests.test_remove",
329+
"many_to_many.tests.ManyToManyTests.test_reverse_assign_with_queryset",
330+
"many_to_many.tests.ManyToManyTests.test_set",
331+
"many_to_many.tests.ManyToManyTests.test_set_existing_different_type",
332+
"many_to_one.tests.ManyToOneTests.test_get_prefetch_queryset_reverse_warning",
312333
"model_fields.test_jsonfield.TestQuerying.test_usage_in_subquery",
313334
"one_to_one.tests.OneToOneTests.test_get_prefetch_queryset_warning",
314335
"one_to_one.tests.OneToOneTests.test_rel_pk_subquery",
@@ -355,6 +376,7 @@ def django_test_expected_failures(self):
355376
"annotations.tests.AliasTests.test_dates_alias",
356377
"dates.tests.DatesTests.test_dates_trunc_datetime_fields",
357378
"dates.tests.DatesTests.test_related_model_traverse",
379+
"many_to_one.tests.ManyToOneTests.test_select_related",
358380
},
359381
"QuerySet.datetimes() is not supported on MongoDB.": {
360382
"annotations.tests.AliasTests.test_datetimes_alias",
@@ -371,6 +393,9 @@ def django_test_expected_failures(self):
371393
"QuerySet.distinct() is not supported.": {
372394
"aggregation.tests.AggregateTestCase.test_sum_distinct_aggregate",
373395
"lookup.tests.LookupTests.test_lookup_collision_distinct",
396+
"many_to_many.tests.ManyToManyTests.test_reverse_selects",
397+
"many_to_many.tests.ManyToManyTests.test_selects",
398+
"many_to_one.tests.ManyToOneTests.test_reverse_selects",
374399
"ordering.tests.OrderingTests.test_orders_nulls_first_on_filtered_subquery",
375400
"queries.tests.ExcludeTest17600.test_exclude_plain_distinct",
376401
"queries.tests.ExcludeTest17600.test_exclude_with_q_is_equal_to_plain_exclude",

0 commit comments

Comments
 (0)