From 527cce80dc03b57f8654f4a5ea64a17a1b3ef7d9 Mon Sep 17 00:00:00 2001 From: Anssi Kääriäinen Date: Sun, 29 Apr 2012 02:11:55 +0300 Subject: Made table_names() output sorted. Fixed #18218 -- previously Django's introspection table_names() and get_table_list() methods did not sort the output consistently. This resulted in random order of inspected models. This commit also removed all external usages of get_table_list(). table_names() should be used instead. Thanks to claudep for patch and report. --- tests/regressiontests/introspection/tests.py | 1 + 1 file changed, 1 insertion(+) (limited to 'tests') diff --git a/tests/regressiontests/introspection/tests.py b/tests/regressiontests/introspection/tests.py index 3bd9d60fa2..b425b6401d 100644 --- a/tests/regressiontests/introspection/tests.py +++ b/tests/regressiontests/introspection/tests.py @@ -40,6 +40,7 @@ class IntrospectionTests(TestCase): def test_table_names(self): tl = connection.introspection.table_names() + self.assertEqual(tl, sorted(tl)) self.assertTrue(Reporter._meta.db_table in tl, "'%s' isn't in table_list()." % Reporter._meta.db_table) self.assertTrue(Article._meta.db_table in tl, -- cgit v1.3