diff options
| author | Anssi Kääriäinen <akaariai@gmail.com> | 2012-04-29 02:11:55 +0300 |
|---|---|---|
| committer | Anssi Kääriäinen <akaariai@gmail.com> | 2012-04-29 02:11:55 +0300 |
| commit | 527cce80dc03b57f8654f4a5ea64a17a1b3ef7d9 (patch) | |
| tree | 9d2e5d8548121b01d53ebe0937b03c506413a6c1 /tests | |
| parent | c2055ee1610e610c372cc17c34e4e1686fcb2011 (diff) | |
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.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/regressiontests/introspection/tests.py | 1 |
1 files changed, 1 insertions, 0 deletions
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, |
