From a7b4a04d6c54679cb0fbc8679367848bd7dae718 Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Mon, 1 Jun 2020 21:59:03 -0400 Subject: Refs #31630 -- Added CharField and IntegerField to DatabaseFeatures.introspected_field_types. CockroachDB introspects CharField as TextField and IntegerField as BigIntegerField. --- tests/introspection/tests.py | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'tests/introspection') diff --git a/tests/introspection/tests.py b/tests/introspection/tests.py index 9335250c89..fd7def1def 100644 --- a/tests/introspection/tests.py +++ b/tests/introspection/tests.py @@ -80,15 +80,12 @@ class IntrospectionTests(TransactionTestCase): self.assertEqual( [connection.introspection.get_field_type(r[1], r) for r in desc], [ - connection.features.introspected_field_types['AutoField'], - 'CharField', - 'CharField', - 'CharField', - connection.features.introspected_field_types['BigIntegerField'], - connection.features.introspected_field_types['BinaryField'], - connection.features.introspected_field_types['SmallIntegerField'], - connection.features.introspected_field_types['DurationField'], - ] + connection.features.introspected_field_types[field] for field in ( + 'AutoField', 'CharField', 'CharField', 'CharField', + 'BigIntegerField', 'BinaryField', 'SmallIntegerField', + 'DurationField', + ) + ], ) def test_get_table_description_col_lengths(self): -- cgit v1.2.1