Skip to content

Commit e486197

Browse files
committed
add custom_pk tests to CI
Setting DatabaseFeatures.supports_unspecified_pk = True also fixes a schema test.
1 parent 26a03a0 commit e486197

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

.github/workflows/test-python.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ jobs:
7171
backends
7272
basic
7373
bulk_create
74+
custom_pk
7475
dates
7576
datetimes
7677
db_functions

django_mongodb/features.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ class DatabaseFeatures(BaseDatabaseFeatures):
3232
supports_timezones = False
3333
# Not implemented: https://github.com/mongodb-labs/django-mongodb/issues/7
3434
supports_transactions = False
35+
supports_unspecified_pk = True
3536
uses_savepoints = False
3637

3738
_django_test_expected_failures = {
@@ -98,7 +99,6 @@ class DatabaseFeatures(BaseDatabaseFeatures):
9899
"schema.tests.SchemaTests.test_order_index",
99100
"schema.tests.SchemaTests.test_text_field_with_db_index",
100101
# AlterField
101-
"schema.tests.SchemaTests.test_alter_auto_field_to_integer_field",
102102
"schema.tests.SchemaTests.test_alter_field_add_index_to_integerfield",
103103
"schema.tests.SchemaTests.test_alter_field_default_dropped",
104104
"schema.tests.SchemaTests.test_alter_field_fk_keeps_index",
@@ -209,6 +209,7 @@ def django_test_expected_failures(self):
209209
},
210210
"AutoField not supported.": {
211211
"bulk_create.tests.BulkCreateTests.test_bulk_insert_nullable_fields",
212+
"custom_pk.tests.CustomPKTests.test_auto_field_subclass_create",
212213
"introspection.tests.IntrospectionTests.test_sequence_list",
213214
"lookup.tests.LookupTests.test_filter_by_reverse_related_field_transform",
214215
"lookup.tests.LookupTests.test_in_ignore_none_with_unhashable_items",

0 commit comments

Comments
 (0)