diff --git a/tests/test_model_serializer.py b/tests/test_model_serializer.py index 8ff97b766..49ad8ac10 100644 --- a/tests/test_model_serializer.py +++ b/tests/test_model_serializer.py @@ -319,6 +319,7 @@ class RelationalModel(models.Model): class UniqueTogetherModel(models.Model): foreign_key = models.ForeignKey(ForeignKeyTargetModel, related_name='unique_foreign_key') one_to_one = models.OneToOneField(OneToOneTargetModel, related_name='unique_one_to_one') + class Meta: unique_together = ("foreign_key", "one_to_one")