Refs #21286 -- Enabled serializer tests with date/datetime pk model
This commit is contained in:
parent
5a52d932ef
commit
d02fc8dfd3
|
@ -188,11 +188,13 @@ class BooleanPKData(models.Model):
|
|||
class CharPKData(models.Model):
|
||||
data = models.CharField(max_length=30, primary_key=True)
|
||||
|
||||
# class DatePKData(models.Model):
|
||||
# data = models.DateField(primary_key=True)
|
||||
|
||||
# class DateTimePKData(models.Model):
|
||||
# data = models.DateTimeField(primary_key=True)
|
||||
class DatePKData(models.Model):
|
||||
data = models.DateField(primary_key=True)
|
||||
|
||||
|
||||
class DateTimePKData(models.Model):
|
||||
data = models.DateTimeField(primary_key=True)
|
||||
|
||||
|
||||
class DecimalPKData(models.Model):
|
||||
|
|
|
@ -16,16 +16,17 @@ from django.test import TestCase
|
|||
|
||||
from .models import (
|
||||
Anchor, AutoNowDateTimeData, BigIntegerData, BinaryData, BooleanData,
|
||||
BooleanPKData, CharData, CharPKData, DateData, DateTimeData, DecimalData,
|
||||
DecimalPKData, EmailData, EmailPKData, ExplicitInheritBaseModel, FileData,
|
||||
FilePathData, FilePathPKData, FKData, FKDataToField, FKDataToO2O,
|
||||
FKSelfData, FKToUUID, FloatData, FloatPKData, GenericData,
|
||||
GenericIPAddressData, GenericIPAddressPKData, InheritAbstractModel,
|
||||
InheritBaseModel, IntegerData, IntegerPKData, Intermediate, LengthModel,
|
||||
M2MData, M2MIntermediateData, M2MSelfData, ModifyingSaveData,
|
||||
NullBooleanData, O2OData, PositiveIntegerData, PositiveIntegerPKData,
|
||||
PositiveSmallIntegerData, PositiveSmallIntegerPKData, SlugData, SlugPKData,
|
||||
SmallData, SmallPKData, Tag, TextData, TimeData, UniqueAnchor, UUIDData,
|
||||
BooleanPKData, CharData, CharPKData, DateData, DatePKData, DateTimeData,
|
||||
DateTimePKData, DecimalData, DecimalPKData, EmailData, EmailPKData,
|
||||
ExplicitInheritBaseModel, FileData, FilePathData, FilePathPKData, FKData,
|
||||
FKDataToField, FKDataToO2O, FKSelfData, FKToUUID, FloatData, FloatPKData,
|
||||
GenericData, GenericIPAddressData, GenericIPAddressPKData,
|
||||
InheritAbstractModel, InheritBaseModel, IntegerData, IntegerPKData,
|
||||
Intermediate, LengthModel, M2MData, M2MIntermediateData, M2MSelfData,
|
||||
ModifyingSaveData, NullBooleanData, O2OData, PositiveIntegerData,
|
||||
PositiveIntegerPKData, PositiveSmallIntegerData,
|
||||
PositiveSmallIntegerPKData, SlugData, SlugPKData, SmallData, SmallPKData,
|
||||
Tag, TextData, TimeData, UniqueAnchor, UUIDData,
|
||||
)
|
||||
from .tests import register_tests
|
||||
|
||||
|
@ -317,8 +318,8 @@ The end."""),
|
|||
(pk_obj, 601, BooleanPKData, True),
|
||||
(pk_obj, 602, BooleanPKData, False),
|
||||
(pk_obj, 610, CharPKData, "Test Char PKData"),
|
||||
# (pk_obj, 620, DatePKData, datetime.date(2006, 6, 16)),
|
||||
# (pk_obj, 630, DateTimePKData, datetime.datetime(2006, 6, 16, 10, 42, 37)),
|
||||
(pk_obj, 620, DatePKData, datetime.date(2006, 6, 16)),
|
||||
(pk_obj, 630, DateTimePKData, datetime.datetime(2006, 6, 16, 10, 42, 37)),
|
||||
(pk_obj, 640, EmailPKData, "hovercraft@example.com"),
|
||||
# (pk_obj, 650, FilePKData, 'file:///foo/bar/whiz.txt'),
|
||||
(pk_obj, 660, FilePathPKData, "/foo/bar/whiz.txt"),
|
||||
|
|
Loading…
Reference in New Issue