mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Refs #23919 -- Removed six.PY2/PY3 usage
Thanks Tim Graham for the review.
This commit is contained in:
@@ -1,13 +1,12 @@
|
||||
import datetime
|
||||
import unittest
|
||||
from decimal import Decimal
|
||||
|
||||
from django.db.models.fields import (
|
||||
AutoField, BigIntegerField, BinaryField, BooleanField, CharField,
|
||||
DateField, DateTimeField, DecimalField, EmailField, FilePathField,
|
||||
FloatField, GenericIPAddressField, IntegerField, IPAddressField,
|
||||
NullBooleanField, PositiveIntegerField, PositiveSmallIntegerField,
|
||||
SlugField, SmallIntegerField, TextField, TimeField, URLField,
|
||||
AutoField, BinaryField, BooleanField, CharField, DateField, DateTimeField,
|
||||
DecimalField, EmailField, FilePathField, FloatField, GenericIPAddressField,
|
||||
IntegerField, IPAddressField, NullBooleanField, PositiveIntegerField,
|
||||
PositiveSmallIntegerField, SlugField, SmallIntegerField, TextField,
|
||||
TimeField, URLField,
|
||||
)
|
||||
from django.db.models.fields.files import FileField, ImageField
|
||||
from django.test import SimpleTestCase
|
||||
@@ -21,11 +20,6 @@ class PromiseTest(SimpleTestCase):
|
||||
lazy_func = lazy(lambda: 1, int)
|
||||
self.assertIsInstance(AutoField(primary_key=True).get_prep_value(lazy_func()), int)
|
||||
|
||||
@unittest.skipIf(six.PY3, 'Python 3 has no `long` type.')
|
||||
def test_BigIntegerField(self):
|
||||
lazy_func = lazy(lambda: long(9999999999999999999), long) # NOQA: long undefined on PY3
|
||||
self.assertIsInstance(BigIntegerField().get_prep_value(lazy_func()), long) # NOQA
|
||||
|
||||
def test_BinaryField(self):
|
||||
lazy_func = lazy(lambda: b'', bytes)
|
||||
self.assertIsInstance(BinaryField().get_prep_value(lazy_func()), bytes)
|
||||
|
||||
Reference in New Issue
Block a user