def test_serializer_pyyaml_error_message(self):
        jane = Author(name="Jane")
        with self.assertRaises(ImportError):
            serializers.serialize("yaml", [jane])
Using yaml serializer without pyyaml raises ImportError
dataset/ETHPy150Open django/django/tests/serializers/test_yaml.py/NoYamlSerializerTestCase.test_serializer_pyyaml_error_message