Fixed #21097 - Added DatabaseFeature.can_introspect_autofield

This commit is contained in:
Michael Manfre 2013-09-12 10:03:29 -04:00 committed by Anssi Kääriäinen
parent 6feb75129f
commit c89d80e2cc
4 changed files with 13 additions and 5 deletions

View file

@ -66,8 +66,9 @@ class IntrospectionTests(TestCase):
# field type on MySQL
self.assertEqual(
[datatype(r[1], r) for r in desc],
['IntegerField', 'CharField', 'CharField', 'CharField',
'BigIntegerField', 'BinaryField' if connection.vendor != 'mysql' else 'TextField']
['AutoField' if connection.features.can_introspect_autofield else 'IntegerField',
'CharField', 'CharField', 'CharField', 'BigIntegerField',
'BinaryField' if connection.vendor != 'mysql' else 'TextField']
)
# The following test fails on Oracle due to #17202 (can't correctly