From 01c6a3e227b645e8dea97e9befecd23d1d3b8581 Mon Sep 17 00:00:00 2001 From: Claude Paroz Date: Sun, 17 Sep 2017 19:27:30 +0200 Subject: [PATCH] Refs #21286 -- Enabled serializer tests with time pk model --- tests/serializers/models/data.py | 5 +++-- tests/serializers/test_data.py | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/serializers/models/data.py b/tests/serializers/models/data.py index b62f85a8684..8f1b5c08618 100644 --- a/tests/serializers/models/data.py +++ b/tests/serializers/models/data.py @@ -249,8 +249,9 @@ class SmallPKData(models.Model): # class TextPKData(models.Model): # data = models.TextField(primary_key=True) -# class TimePKData(models.Model): -# data = models.TimeField(primary_key=True) + +class TimePKData(models.Model): + data = models.TimeField(primary_key=True) class UUIDData(models.Model): diff --git a/tests/serializers/test_data.py b/tests/serializers/test_data.py index 62ce2bbfec4..2c7a2ffa6ff 100644 --- a/tests/serializers/test_data.py +++ b/tests/serializers/test_data.py @@ -26,7 +26,7 @@ from .models import ( ModifyingSaveData, NullBooleanData, O2OData, PositiveIntegerData, PositiveIntegerPKData, PositiveSmallIntegerData, PositiveSmallIntegerPKData, SlugData, SlugPKData, SmallData, SmallPKData, - Tag, TextData, TimeData, UniqueAnchor, UUIDData, + Tag, TextData, TimeData, TimePKData, UniqueAnchor, UUIDData, ) from .tests import register_tests @@ -346,7 +346,7 @@ The end."""), # It contains line breaks. # Several of them. # The end."""), - # (pk_obj, 770, TimePKData, datetime.time(10, 42, 37)), + (pk_obj, 770, TimePKData, datetime.time(10, 42, 37)), # (pk_obj, 790, XMLPKData, ""), (pk_obj, 791, UUIDData, uuid_obj), (fk_obj, 792, FKToUUID, uuid_obj),