diff options
author | Caio Ariede <caio.ariede@gmail.com> | 2019-10-16 09:32:12 -0300 |
---|---|---|
committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2019-11-19 09:34:11 +0100 |
commit | 555bebe7749ab1a72d5141a00f9ce7a602c72298 (patch) | |
tree | 54b6414c047c65dd5d4c22e388168d9c9edfb84a /tests/inspectdb | |
parent | aa12cf07c9202e117712abe2621d901dd6dd94b4 (diff) | |
download | django-555bebe7749ab1a72d5141a00f9ce7a602c72298.tar.gz |
Fixed #30987 -- Added models.PositiveBigIntegerField.
Diffstat (limited to 'tests/inspectdb')
-rw-r--r-- | tests/inspectdb/models.py | 1 | ||||
-rw-r--r-- | tests/inspectdb/tests.py | 8 |
2 files changed, 9 insertions, 0 deletions
diff --git a/tests/inspectdb/models.py b/tests/inspectdb/models.py index 20f6b5e940..8a48031b24 100644 --- a/tests/inspectdb/models.py +++ b/tests/inspectdb/models.py @@ -57,6 +57,7 @@ class ColumnTypes(models.Model): float_field = models.FloatField() int_field = models.IntegerField() gen_ip_address_field = models.GenericIPAddressField(protocol="ipv4") + pos_big_int_field = models.PositiveBigIntegerField() pos_int_field = models.PositiveIntegerField() pos_small_int_field = models.PositiveSmallIntegerField() slug_field = models.SlugField() diff --git a/tests/inspectdb/tests.py b/tests/inspectdb/tests.py index 13a0d29107..6e3f4b8aa6 100644 --- a/tests/inspectdb/tests.py +++ b/tests/inspectdb/tests.py @@ -118,11 +118,19 @@ class InspectDBTestCase(TestCase): assertFieldType('pos_int_field', "models.IntegerField()") if connection.features.can_introspect_positive_integer_field: + if connection.features.can_introspect_big_integer_field: + assertFieldType('pos_big_int_field', 'models.PositiveBigIntegerField()') + else: + assertFieldType('pos_big_int_field', 'models.PositiveIntegerField()') if connection.features.can_introspect_small_integer_field: assertFieldType('pos_small_int_field', "models.PositiveSmallIntegerField()") else: assertFieldType('pos_small_int_field', "models.PositiveIntegerField()") else: + if connection.features.can_introspect_big_integer_field: + assertFieldType('pos_big_int_field', 'models.BigIntegerField()') + else: + assertFieldType('pos_big_int_field', 'models.IntegerField()') if connection.features.can_introspect_small_integer_field: assertFieldType('pos_small_int_field', "models.SmallIntegerField()") else: |