Skip to content

Commit 89aa87f

Browse files
committed
add backends tests to CI
1 parent 73d9d47 commit 89aa87f

File tree

2 files changed

+35
-1
lines changed

2 files changed

+35
-1
lines changed

.github/workflows/test-python.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ jobs:
7171
aggregation_regress
7272
annotations
7373
auth_tests.test_models.UserManagerTestCase
74-
backends.base.test_base.DatabaseWrapperTests
74+
backends
7575
basic
7676
bulk_create
7777
dates

django_mongodb/features.py

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,12 @@ class DatabaseFeatures(BaseDatabaseFeatures):
1919
supports_json_field_contains = False
2020
# BSON Date type doesn't support microsecond precision.
2121
supports_microsecond_precision = False
22+
supports_paramstyle_pyformat = False
2223
supports_select_difference = False
2324
supports_select_intersection = False
2425
# Not implemented: https://github.com/mongodb-labs/django-mongodb/issues/72
2526
supports_select_union = False
27+
supports_sequence_reset = False
2628
supports_table_check_constraints = False
2729
supports_temporal_subtraction = True
2830
# MongoDB stores datetimes in UTC.
@@ -78,6 +80,12 @@ class DatabaseFeatures(BaseDatabaseFeatures):
7880
"many_to_one.tests.ManyToOneTests.test_selects",
7981
# Incorrect JOIN with GenericRelation gives incorrect results.
8082
"aggregation_regress.tests.AggregationTests.test_aggregation_with_generic_reverse_relation",
83+
# subclasses of BaseDatabaseWrapper may require an is_usable() method
84+
"backends.tests.BackendTestCase.test_is_usable_after_database_disconnects",
85+
# Connection creation doesn't follow the usual Django API.
86+
"backends.tests.ThreadTests.test_pass_connection_between_threads",
87+
"backends.tests.ThreadTests.test_closing_non_shared_connections",
88+
"backends.tests.ThreadTests.test_default_connection_thread_local",
8189
# AddField
8290
"schema.tests.SchemaTests.test_add_datefield_and_datetimefield_use_effective_default",
8391
"schema.tests.SchemaTests.test_add_field",
@@ -201,6 +209,7 @@ def django_test_expected_failures(self):
201209
"model_fields.test_uuid.TestQuerying.test_startswith",
202210
},
203211
"QuerySet.prefetch_related() is not supported on MongoDB.": {
212+
"backends.base.test_creation.TestDeserializeDbFromString.test_serialize_db_to_string_base_manager_with_prefetch_related",
204213
"m2m_through_regress.test_multitable.MultiTableTests.test_m2m_prefetch_proxied",
205214
"m2m_through_regress.test_multitable.MultiTableTests.test_m2m_prefetch_reverse_proxied",
206215
"many_to_many.tests.ManyToManyTests.test_add_after_prefetch",
@@ -424,6 +433,7 @@ def django_test_expected_failures(self):
424433
"aggregation.tests.AggregateTestCase.test_dates_with_aggregation",
425434
"annotations.tests.AliasTests.test_dates_alias",
426435
"aggregation_regress.tests.AggregationTests.test_more_more_more2",
436+
"backends.tests.DateQuotingTest.test_django_date_trunc",
427437
"dates.tests.DatesTests.test_dates_trunc_datetime_fields",
428438
"dates.tests.DatesTests.test_related_model_traverse",
429439
"many_to_one.tests.ManyToOneTests.test_select_related",
@@ -510,6 +520,19 @@ def django_test_expected_failures(self):
510520
"Test executes raw SQL.": {
511521
"aggregation.tests.AggregateTestCase.test_coalesced_empty_result_set",
512522
"annotations.tests.NonAggregateAnnotationTestCase.test_raw_sql_with_inherited_field",
523+
"backends.base.test_base.ExecuteWrapperTests",
524+
"backends.tests.BackendTestCase.test_cursor_contextmanager",
525+
"backends.tests.BackendTestCase.test_cursor_executemany",
526+
"backends.tests.BackendTestCase.test_cursor_executemany_with_empty_params_list",
527+
"backends.tests.BackendTestCase.test_cursor_executemany_with_iterator",
528+
"backends.tests.BackendTestCase.test_duplicate_table_error",
529+
"backends.tests.BackendTestCase.test_queries",
530+
"backends.tests.BackendTestCase.test_queries_bare_where",
531+
"backends.tests.BackendTestCase.test_queries_limit",
532+
"backends.tests.BackendTestCase.test_queries_logger",
533+
"backends.tests.BackendTestCase.test_unicode_fetches",
534+
"backends.tests.EscapingChecks",
535+
"backends.test_utils.CursorWrapperTests",
513536
"delete_regress.tests.DeleteLockingTest.test_concurrent_delete",
514537
"expressions.tests.BasicExpressionsTests.test_annotate_values_filter",
515538
"expressions.tests.BasicExpressionsTests.test_filtering_on_rawsql_that_is_boolean",
@@ -627,12 +650,23 @@ def django_test_expected_failures(self):
627650
"queries.test_q.QCheckTests",
628651
"queries.test_query.TestQueryNoModel",
629652
},
653+
"MongoDB doesn't use CursorDebugWrapper.": {
654+
"backends.tests.LastExecutedQueryTest.test_last_executed_query",
655+
"backends.tests.LastExecutedQueryTest.test_last_executed_query_with_duplicate_params",
656+
"backends.tests.LastExecutedQueryTest.test_query_encoding",
657+
},
630658
"Test not applicable for MongoDB's SQLCompiler.": {
631659
"queries.test_iterator.QuerySetIteratorTests",
632660
},
633661
"Support for views not implemented.": {
634662
"introspection.tests.IntrospectionTests.test_table_names_with_views",
635663
},
664+
"Connection health checks not implemented.": {
665+
"backends.base.test_base.ConnectionHealthChecksTests",
666+
},
667+
"transaction.atomic() is not supported.": {
668+
"backends.base.test_base.DatabaseWrapperLoggingTests",
669+
},
636670
}
637671

638672
@cached_property

0 commit comments

Comments
 (0)