mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user