diff --git a/tests/serializers_regress/models.py b/tests/serializers_regress/models.py index fd808639169..b7c4575c6d9 100644 --- a/tests/serializers_regress/models.py +++ b/tests/serializers_regress/models.py @@ -280,6 +280,10 @@ class SmallPKData(models.Model): # data = models.TimeField(primary_key=True) +class UUIDData(models.Model): + data = models.UUIDField(primary_key=True) + + class ComplexModel(models.Model): field1 = models.CharField(max_length=10) field2 = models.CharField(max_length=10) diff --git a/tests/serializers_regress/tests.py b/tests/serializers_regress/tests.py index 5ec850cf62c..71a19f73811 100644 --- a/tests/serializers_regress/tests.py +++ b/tests/serializers_regress/tests.py @@ -10,6 +10,7 @@ from __future__ import unicode_literals import datetime import decimal +import uuid from unittest import skipUnless from django.core import serializers @@ -36,7 +37,7 @@ from .models import ( NullBooleanData, O2OData, PositiveIntegerData, PositiveIntegerPKData, PositiveSmallIntegerData, PositiveSmallIntegerPKData, ProxyBaseModel, ProxyProxyBaseModel, SlugData, SlugPKData, SmallData, SmallPKData, Tag, - TextData, TimeData, UniqueAnchor, + TextData, TimeData, UniqueAnchor, UUIDData, ) try: @@ -360,6 +361,7 @@ The end."""), # The end."""), # (pk_obj, 770, TimePKData, datetime.time(10, 42, 37)), # (pk_obj, 790, XMLPKData, ""), + (pk_obj, 791, UUIDData, uuid.uuid4()), (data_obj, 800, AutoNowDateTimeData, datetime.datetime(2006, 6, 16, 10, 42, 37)), (data_obj, 810, ModifyingSaveData, 42),