diff --git a/tests/regressiontests/serializers_regress/models.py b/tests/regressiontests/serializers_regress/models.py
index b3ae1fe..9381349 100644
a
|
b
|
class ExplicitInheritBaseModel(BaseModel):
|
259 | 259 | parent = models.OneToOneField(BaseModel) |
260 | 260 | child_data = models.IntegerField() |
261 | 261 | |
| 262 | class ProxyBaseModel(BaseModel): |
| 263 | class Meta: |
| 264 | proxy = True |
| 265 | |
262 | 266 | class LengthModel(models.Model): |
263 | 267 | data = models.IntegerField() |
264 | 268 | |
diff --git a/tests/regressiontests/serializers_regress/tests.py b/tests/regressiontests/serializers_regress/tests.py
index 5abff63..d8c5fab 100644
a
|
b
|
from .models import (BooleanData, CharData, DateData, DateTimeData, EmailData,
|
40 | 40 | DecimalPKData, FloatPKData, IntegerPKData, IPAddressPKData, |
41 | 41 | GenericIPAddressPKData, PhonePKData, PositiveIntegerPKData, |
42 | 42 | PositiveSmallIntegerPKData, SlugPKData, SmallPKData, USStatePKData, |
43 | | AutoNowDateTimeData, ModifyingSaveData, InheritAbstractModel, |
44 | | ExplicitInheritBaseModel, InheritBaseModel, BigIntegerData, LengthModel, |
45 | | Tag, ComplexModel) |
| 43 | AutoNowDateTimeData, ModifyingSaveData, InheritAbstractModel, BaseModel, |
| 44 | ExplicitInheritBaseModel, InheritBaseModel, ProxyBaseModel, BigIntegerData, |
| 45 | LengthModel, Tag, ComplexModel) |
46 | 46 | |
47 | 47 | # A set of functions that can be used to recreate |
48 | 48 | # test data objects of various kinds. |
… |
… |
class SerializerTests(TestCase):
|
408 | 408 | for obj in serializers.deserialize("yaml", "{"): |
409 | 409 | pass |
410 | 410 | |
| 411 | def test_serialize_proxy_model(self): |
| 412 | BaseModel.objects.create(parent_data=1) |
| 413 | base_objects = BaseModel.objects.all() |
| 414 | proxy_objects = ProxyBaseModel.objects.all() |
| 415 | base_data = serializers.serialize("json", base_objects) |
| 416 | proxy_data = serializers.serialize("json", proxy_objects) |
| 417 | self.assertEqual(base_data, proxy_data.replace('proxy', '')) |
| 418 | |
411 | 419 | |
412 | 420 | def serializerTest(format, self): |
413 | 421 | |