Skip to content

Commit 9d37ade

Browse files
committed
sort result of DatabaseIntrospection.table_names()
1 parent 0e51a4f commit 9d37ade

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

django_mongodb/features.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,6 @@ class DatabaseFeatures(BaseDatabaseFeatures):
7373
"many_to_one.tests.ManyToOneTests.test_selects",
7474
# Incorrect JOIN with GenericRelation gives incorrect results.
7575
"aggregation_regress.tests.AggregationTests.test_aggregation_with_generic_reverse_relation",
76-
# Table names should be sorted.
77-
"introspection.tests.IntrospectionTests.test_table_names",
7876
}
7977
# $bitAnd, #bitOr, and $bitXor are new in MongoDB 6.3.
8078
_django_test_expected_failures_bitwise = {

django_mongodb/introspection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33

44
class DatabaseIntrospection(BaseDatabaseIntrospection):
55
def table_names(self, cursor=None, include_views=False):
6-
return [x["name"] for x in self.connection.database.list_collections()]
6+
return sorted([x["name"] for x in self.connection.database.list_collections()])

0 commit comments

Comments
 (0)