From 5839ba742b570d81acd8e8f7e1afd9da1672bb02 Mon Sep 17 00:00:00 2001 From: Steve Lacey Date: Tue, 7 Mar 2023 18:07:09 +0800 Subject: [PATCH] Proxy marshmallow missing utility --- tests/test_serializers.py | 31 +++++++++++++++---------------- worf/serializers.py | 1 + 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/tests/test_serializers.py b/tests/test_serializers.py index 8ba1f4c..073fb0a 100644 --- a/tests/test_serializers.py +++ b/tests/test_serializers.py @@ -1,37 +1,36 @@ -from tests.serializers import ( - ProfileSerializer, - RoleSerializer, - SkillSerializer, - TagSerializer, - TaskSerializer, - TeamSerializer, - UserSerializer, -) +import marshmallow + +import tests.serializers +import worf.serializers + + +def test_missing(): + assert worf.serializers.missing == marshmallow.missing def test_profile_serializer(): - assert f"{ProfileSerializer()}" + assert f"{tests.serializers.ProfileSerializer()}" def test_role_serializer(): - assert f"{RoleSerializer()}" + assert f"{tests.serializers.RoleSerializer()}" def test_skill_serializer(): - assert f"{SkillSerializer()}" + assert f"{tests.serializers.SkillSerializer()}" def test_tag_serializer(): - assert f"{TagSerializer()}" + assert f"{tests.serializers.TagSerializer()}" def test_task_serializer(): - assert f"{TaskSerializer()}" + assert f"{tests.serializers.TaskSerializer()}" def test_team_serializer(): - assert f"{TeamSerializer()}" + assert f"{tests.serializers.TeamSerializer()}" def test_user_serializer(): - assert f"{UserSerializer()}" + assert f"{tests.serializers.UserSerializer()}" diff --git a/worf/serializers.py b/worf/serializers.py index cd18ad2..63faa12 100644 --- a/worf/serializers.py +++ b/worf/serializers.py @@ -1,5 +1,6 @@ import marshmallow from marshmallow.decorators import * # noqa: F401, F403 +from marshmallow.utils import missing # noqa: F401 from django.db.models.fields.files import FieldFile