Unregistering a serializer doesn't cause the registry to be repopulated.
(self)
| 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): |
nothing calls this directly
no test coverage detected