MCPcopy
hub / github.com/django/django / test_register

Method test_register

tests/serializers/tests.py:47–54  ·  view source on GitHub ↗

Registering a new serializer populates the full registry. Refs #14823

(self)

Source from the content-addressed store, hash-verified

45 serializers._serializers = self.old_serializers
46
47 def test_register(self):
48 "Registering a new serializer populates the full registry. Refs #14823"
49 serializers.register_serializer("json3", "django.core.serializers.json")
50
51 public_formats = serializers.get_public_serializer_formats()
52 self.assertIn("json3", public_formats)
53 self.assertIn("json2", public_formats)
54 self.assertIn("xml", public_formats)
55
56 def test_unregister(self):
57 """

Callers

nothing calls this directly

Calls 1

register_serializerMethod · 0.80

Tested by

no test coverage detected