Fixed #30987 -- Added models.PositiveBigIntegerField.

This commit is contained in:
Caio Ariede 2019-10-16 09:32:12 -03:00 committed by Mariusz Felisiak
parent aa12cf07c9
commit 555bebe774
28 changed files with 112 additions and 11 deletions

View file

@ -4,9 +4,9 @@ from decimal import Decimal
from django.db.models.fields import (
AutoField, BinaryField, BooleanField, CharField, DateField, DateTimeField,
DecimalField, EmailField, FilePathField, FloatField, GenericIPAddressField,
IntegerField, IPAddressField, NullBooleanField, PositiveIntegerField,
PositiveSmallIntegerField, SlugField, SmallIntegerField, TextField,
TimeField, URLField,
IntegerField, IPAddressField, NullBooleanField, PositiveBigIntegerField,
PositiveIntegerField, PositiveSmallIntegerField, SlugField,
SmallIntegerField, TextField, TimeField, URLField,
)
from django.db.models.fields.files import FileField, ImageField
from django.test import SimpleTestCase
@ -97,6 +97,10 @@ class PromiseTest(SimpleTestCase):
lazy_func = lazy(lambda: 1, int)
self.assertIsInstance(PositiveSmallIntegerField().get_prep_value(lazy_func()), int)
def test_PositiveBigIntegerField(self):
lazy_func = lazy(lambda: 1, int)
self.assertIsInstance(PositiveBigIntegerField().get_prep_value(lazy_func()), int)
def test_SlugField(self):
lazy_func = lazy(lambda: 'slug', str)
self.assertIsInstance(SlugField().get_prep_value(lazy_func()), str)