mirror of
https://github.com/django/django.git
synced 2025-11-25 21:22:14 +00:00
Refs #27090 -- Added real database sequence introspection.
Thanks Mariusz Felisiak for the Oracle part and Tim Graham for the review.
This commit is contained in:
parent
c2ecef869c
commit
c6a1faecc3
9 changed files with 131 additions and 10 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue