summaryrefslogtreecommitdiff
path: root/tests/model_fields/test_integerfield.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/model_fields/test_integerfield.py')
-rw-r--r--tests/model_fields/test_integerfield.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/model_fields/test_integerfield.py b/tests/model_fields/test_integerfield.py
index bc370f18e2..13b18d967c 100644
--- a/tests/model_fields/test_integerfield.py
+++ b/tests/model_fields/test_integerfield.py
@@ -176,6 +176,11 @@ class BigIntegerFieldTests(IntegerFieldTests):
class PositiveSmallIntegerFieldTests(IntegerFieldTests):
model = PositiveSmallIntegerModel
documented_range = (0, 32767)
+ rel_db_type_class = (
+ models.PositiveSmallIntegerField
+ if connection.features.related_fields_match_type
+ else models.SmallIntegerField
+ )
class PositiveIntegerFieldTests(IntegerFieldTests):
@@ -198,6 +203,11 @@ class PositiveIntegerFieldTests(IntegerFieldTests):
class PositiveBigIntegerFieldTests(IntegerFieldTests):
model = PositiveBigIntegerModel
documented_range = (0, 9223372036854775807)
+ rel_db_type_class = (
+ models.PositiveBigIntegerField
+ if connection.features.related_fields_match_type
+ else models.BigIntegerField
+ )
class ValidationTests(SimpleTestCase):