MCPcopy
hub / github.com/django/django / test_unregister

Method test_unregister

tests/serializers/tests.py:56–67  ·  view source on GitHub ↗

Unregistering a serializer doesn't cause the registry to be repopulated.

(self)

Source from the content-addressed store, hash-verified

54 self.assertIn("xml", public_formats)
55
56 def test_unregister(self):
57 """
58 Unregistering a serializer doesn't cause the registry to be
59 repopulated.
60 """
61 serializers.unregister_serializer("xml")
62 serializers.register_serializer("json3", "django.core.serializers.json")
63
64 public_formats = serializers.get_public_serializer_formats()
65
66 self.assertNotIn("xml", public_formats)
67 self.assertIn("json3", public_formats)
68
69 def test_unregister_unknown_serializer(self):
70 with self.assertRaises(SerializerDoesNotExist):

Callers

nothing calls this directly

Calls 2

unregister_serializerMethod · 0.80
register_serializerMethod · 0.80

Tested by

no test coverage detected