diff options
author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2017-09-13 20:12:32 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-13 20:12:32 +0200 |
commit | c6a1faecc3d6e25597a7105df74f11678f2f2aac (patch) | |
tree | 84f7d7ce04ec478ba9652ecdf3728a259538864a /tests/introspection | |
parent | c2ecef869ce46349e79c39610cd66a576d78289e (diff) | |
download | django-c6a1faecc3d6e25597a7105df74f11678f2f2aac.tar.gz |
Refs #27090 -- Added real database sequence introspection.
Thanks Mariusz Felisiak for the Oracle part and Tim Graham for the
review.
Diffstat (limited to 'tests/introspection')
-rw-r--r-- | tests/introspection/tests.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/introspection/tests.py b/tests/introspection/tests.py index c449b6de82..ed10927b2a 100644 --- a/tests/introspection/tests.py +++ b/tests/introspection/tests.py @@ -61,8 +61,9 @@ class IntrospectionTests(TransactionTestCase): def test_sequence_list(self): sequences = connection.introspection.sequence_list() - expected = {'table': Reporter._meta.db_table, 'column': 'id'} - self.assertIn(expected, sequences, 'Reporter sequence not found in sequence_list()') + reporter_seqs = [seq for seq in sequences if seq['table'] == Reporter._meta.db_table] + self.assertEqual(len(reporter_seqs), 1, 'Reporter sequence not found in sequence_list()') + self.assertEqual(reporter_seqs[0]['column'], 'id') def test_get_table_description_names(self): with connection.cursor() as cursor: |