Ticket #24320: 24320-test.2.diff
File 24320-test.2.diff, 2.8 KB (added by , 10 years ago) |
---|
-
tests/serializers_regress/models.py
diff --git a/tests/serializers_regress/models.py b/tests/serializers_regress/models.py index 3be5d6b..67cf0dd 100644
a b class UUIDData(models.Model): 276 276 data = models.UUIDField(primary_key=True) 277 277 278 278 279 class FKToUUID(models.Model): 280 data = models.ForeignKey(UUIDData) 281 282 279 283 class ComplexModel(models.Model): 280 284 field1 = models.CharField(max_length=10) 281 285 field2 = models.CharField(max_length=10) -
tests/serializers_regress/tests.py
diff --git a/tests/serializers_regress/tests.py b/tests/serializers_regress/tests.py index e00d68a..4432334 100644
a b from .models import ( 28 28 BooleanData, BooleanPKData, CharData, CharPKData, ComplexModel, DateData, 29 29 DateTimeData, DecimalData, DecimalPKData, EmailData, EmailPKData, 30 30 ExplicitInheritBaseModel, FileData, FilePathData, FilePathPKData, FKData, 31 FKDataNaturalKey, FKDataToField, FKDataToO2O, FKSelfData, F loatData,32 Float PKData, GenericData, GenericIPAddressData, GenericIPAddressPKData,33 InheritAbstractModel, InheritBaseModel, IntegerData, IntegerPKData,34 Inte rmediate, LengthModel, M2MData, M2MIntermediateData, M2MSelfData,35 M odifyingSaveData, NaturalKeyAnchor, NullBooleanData, O2OData,36 PositiveIntegerData, PositiveIntegerPKData, PositiveSmallIntegerData,37 PositiveSmallInteger PKData, ProxyBaseModel, ProxyProxyBaseModel, SlugData,38 SlugPKData, SmallData, SmallPKData, Tag, TextData, TimeData, UniqueAnchor,39 UUIDData,31 FKDataNaturalKey, FKDataToField, FKDataToO2O, FKSelfData, FKToUUID, 32 FloatData, FloatPKData, GenericData, GenericIPAddressData, 33 GenericIPAddressPKData, InheritAbstractModel, InheritBaseModel, 34 IntegerData, IntegerPKData, Intermediate, LengthModel, M2MData, 35 M2MIntermediateData, M2MSelfData, ModifyingSaveData, NaturalKeyAnchor, 36 NullBooleanData, O2OData, PositiveIntegerData, PositiveIntegerPKData, 37 PositiveSmallIntegerData, PositiveSmallIntegerPKData, ProxyBaseModel, 38 ProxyProxyBaseModel, SlugData, SlugPKData, SmallData, SmallPKData, Tag, 39 TextData, TimeData, UniqueAnchor, UUIDData, 40 40 ) 41 41 42 42 try: … … im_obj = (im_create, im_compare) 201 201 o2o_obj = (o2o_create, o2o_compare) 202 202 pk_obj = (pk_create, pk_compare) 203 203 inherited_obj = (inherited_create, inherited_compare) 204 uuid1 = uuid.uuid4() 204 205 205 206 test_data = [ 206 207 # Format: (data type, PK value, Model Class, data) … … The end."""), 356 357 # The end."""), 357 358 # (pk_obj, 770, TimePKData, datetime.time(10, 42, 37)), 358 359 # (pk_obj, 790, XMLPKData, "<foo></foo>"), 359 (pk_obj, 791, UUIDData, uuid.uuid4()), 360 (pk_obj, 791, UUIDData, uuid1), 361 (fk_obj, 792, FKToUUID, uuid1), 360 362 361 363 (data_obj, 800, AutoNowDateTimeData, datetime.datetime(2006, 6, 16, 10, 42, 37)), 362 364 (data_obj, 810, ModifyingSaveData, 42),