From 08f62d2f1f6924b52759ae8cca0433aaf35729ce Mon Sep 17 00:00:00 2001 From: George Bocharov Date: Tue, 23 Jan 2024 16:45:50 +0000 Subject: [PATCH] clear serializer registry before all tests --- tests/conftest.py | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 tests/conftest.py diff --git a/tests/conftest.py b/tests/conftest.py new file mode 100644 index 0000000..fbd06c3 --- /dev/null +++ b/tests/conftest.py @@ -0,0 +1,9 @@ +import pytest + +from drf_pydantic.parse import SERIALIZER_REGISTRY + + +@pytest.fixture(autouse=True, scope="function") +def reset_serializers(): + SERIALIZER_REGISTRY.clear() + assert len(SERIALIZER_REGISTRY) == 0