summaryrefslogtreecommitdiff
path: root/tests/introspection
diff options
context:
space:
mode:
authorHasan Ramezani <hasan.r67@gmail.com>2020-05-27 00:25:45 +0200
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2020-06-04 08:27:42 +0200
commite198beadad56d5fdd06756b097446b7046a84010 (patch)
tree259d188fe8ab2490916419a771163a750b618935 /tests/introspection
parent55556e51fb152c864ddc782d9b56e8b785ccf8bc (diff)
downloaddjango-e198beadad56d5fdd06756b097446b7046a84010.tar.gz
Fixed #31630 -- Replaced introspection features with DatabaseFeatures.introspected_field_types.
Diffstat (limited to 'tests/introspection')
-rw-r--r--tests/introspection/tests.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/introspection/tests.py b/tests/introspection/tests.py
index bafd620232..8ca5c3af3b 100644
--- a/tests/introspection/tests.py
+++ b/tests/introspection/tests.py
@@ -84,10 +84,10 @@ class IntrospectionTests(TransactionTestCase):
'CharField',
'CharField',
'CharField',
- 'BigIntegerField' if connection.features.can_introspect_big_integer_field else 'IntegerField',
- 'BinaryField' if connection.features.can_introspect_binary_field else 'TextField',
- 'SmallIntegerField' if connection.features.can_introspect_small_integer_field else 'IntegerField',
- 'DurationField' if connection.features.can_introspect_duration_field else 'BigIntegerField',
+ connection.features.introspected_field_types['BigIntegerField'],
+ connection.features.introspected_field_types['BinaryField'],
+ connection.features.introspected_field_types['SmallIntegerField'],
+ connection.features.introspected_field_types['DurationField'],
]
)
@@ -113,7 +113,7 @@ class IntrospectionTests(TransactionTestCase):
with connection.cursor() as cursor:
desc = connection.introspection.get_table_description(cursor, City._meta.db_table)
self.assertIn(
- connection.features.introspected_big_auto_field_type,
+ connection.features.introspected_field_types['BigAutoField'],
[connection.introspection.get_field_type(r[1], r) for r in desc],
)
@@ -122,7 +122,7 @@ class IntrospectionTests(TransactionTestCase):
with connection.cursor() as cursor:
desc = connection.introspection.get_table_description(cursor, Country._meta.db_table)
self.assertIn(
- connection.features.introspected_small_auto_field_type,
+ connection.features.introspected_field_types['SmallAutoField'],
[connection.introspection.get_field_type(r[1], r) for r in desc],
)