From 3d4fe39bac082b835a2d82b717b6ae88ea70ea15 Mon Sep 17 00:00:00 2001 From: Adam Zapletal Date: Fri, 1 Mar 2024 12:51:02 -0600 Subject: [PATCH] Refs #21286 -- Removed invalid commented out models and tests from serializer tests. FileField/ImageField cannot be primary keys, so serialization support for this case will not be implemented. XMLField was removed in d1290b5b43485c7018ba92981d34c1f96614924e. --- tests/serializers/models/data.py | 8 -------- tests/serializers/test_data.py | 3 --- 2 files changed, 11 deletions(-) diff --git a/tests/serializers/models/data.py b/tests/serializers/models/data.py index a0e8751461..212ea0e06f 100644 --- a/tests/serializers/models/data.py +++ b/tests/serializers/models/data.py @@ -210,10 +210,6 @@ class EmailPKData(models.Model): data = models.EmailField(primary_key=True) -# class FilePKData(models.Model): -# data = models.FileField(primary_key=True) - - class FilePathPKData(models.Model): data = models.FilePathField(primary_key=True) @@ -226,10 +222,6 @@ class IntegerPKData(models.Model): data = models.IntegerField(primary_key=True) -# class ImagePKData(models.Model): -# data = models.ImageField(primary_key=True) - - class GenericIPAddressPKData(models.Model): data = models.GenericIPAddressField(primary_key=True) diff --git a/tests/serializers/test_data.py b/tests/serializers/test_data.py index 6361dc0c05..33ea3458de 100644 --- a/tests/serializers/test_data.py +++ b/tests/serializers/test_data.py @@ -369,7 +369,6 @@ The end.""", (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"), (pk_obj, 670, DecimalPKData, decimal.Decimal("12.345")), (pk_obj, 671, DecimalPKData, decimal.Decimal("-12.345")), @@ -380,7 +379,6 @@ The end.""", (pk_obj, 680, IntegerPKData, 123456789), (pk_obj, 681, IntegerPKData, -123456789), (pk_obj, 682, IntegerPKData, 0), - # (XX, ImagePKData (pk_obj, 695, GenericIPAddressPKData, "fe80:1424:2223:6cff:fe8a:2e8a:2151:abcd"), (pk_obj, 720, PositiveIntegerPKData, 123456789), (pk_obj, 730, PositiveSmallIntegerPKData, 12), @@ -393,7 +391,6 @@ The end.""", # Several of them. # The end."""), # (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), (pk_obj, 793, UUIDDefaultData, uuid_obj),