Skip to content

Commit c94b1b4

Browse files
committed
add introspection tests to CI
1 parent 19d04ca commit c94b1b4

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

.github/workflows/test-python.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ jobs:
8585
defer
8686
defer_regress
8787
from_db_value
88+
introspection
8889
known_related_objects
8990
lookup
9091
m2m_and_m2o

django_mongodb/features.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
class DatabaseFeatures(BaseDatabaseFeatures):
66
allow_sliced_subqueries_with_in = False
7+
can_introspect_foreign_keys = False
78
greatest_least_ignores_nulls = True
89
has_json_object_function = False
910
has_native_json_field = True
@@ -72,6 +73,8 @@ class DatabaseFeatures(BaseDatabaseFeatures):
7273
"many_to_one.tests.ManyToOneTests.test_selects",
7374
# Incorrect JOIN with GenericRelation gives incorrect results.
7475
"aggregation_regress.tests.AggregationTests.test_aggregation_with_generic_reverse_relation",
76+
# Table names should be sorted.
77+
"introspection.tests.IntrospectionTests.test_table_names",
7578
}
7679
# $bitAnd, #bitOr, and $bitXor are new in MongoDB 6.3.
7780
_django_test_expected_failures_bitwise = {
@@ -127,6 +130,7 @@ def django_test_expected_failures(self):
127130
},
128131
"AutoField not supported.": {
129132
"bulk_create.tests.BulkCreateTests.test_bulk_insert_nullable_fields",
133+
"introspection.tests.IntrospectionTests.test_sequence_list",
130134
"lookup.tests.LookupTests.test_filter_by_reverse_related_field_transform",
131135
"lookup.tests.LookupTests.test_in_ignore_none_with_unhashable_items",
132136
"m2m_through_regress.tests.ThroughLoadDataTestCase.test_sequence_creation",
@@ -497,6 +501,21 @@ def django_test_expected_failures(self):
497501
"db_functions.comparison.test_cast.CastTests.test_cast_from_python_to_datetime",
498502
"db_functions.comparison.test_cast.CastTests.test_cast_to_duration",
499503
},
504+
"DatabaseIntrospection.get_table_description() not supported.": {
505+
"introspection.tests.IntrospectionTests.test_bigautofield",
506+
"introspection.tests.IntrospectionTests.test_get_table_description_col_lengths",
507+
"introspection.tests.IntrospectionTests.test_get_table_description_names",
508+
"introspection.tests.IntrospectionTests.test_get_table_description_nullable",
509+
"introspection.tests.IntrospectionTests.test_get_table_description_types",
510+
"introspection.tests.IntrospectionTests.test_smallautofield",
511+
},
512+
"DatabaseIntrospection.get_constraints() not implemented.": {
513+
"introspection.tests.IntrospectionTests.test_get_constraints",
514+
"introspection.tests.IntrospectionTests.test_get_constraints_index_types",
515+
"introspection.tests.IntrospectionTests.test_get_constraints_indexes_orders",
516+
"introspection.tests.IntrospectionTests.test_get_constraints_unique_indexes_orders",
517+
"introspection.tests.IntrospectionTests.test_get_primary_key_column",
518+
},
500519
"Known issue querying JSONField.": {
501520
# An ExpressionWrapper annotation with KeyTransform followed by
502521
# .filter(expr__isnull=False) doesn't use KeyTransformIsNull as it
@@ -522,6 +541,9 @@ def django_test_expected_failures(self):
522541
"Test not applicable for MongoDB's SQLCompiler.": {
523542
"queries.test_iterator.QuerySetIteratorTests",
524543
},
544+
"Support for views not implemented.": {
545+
"introspection.tests.IntrospectionTests.test_table_names_with_views",
546+
},
525547
}
526548

527549
@cached_property

0 commit comments

Comments
 (0)