def METHOD_NAME(self):
    """Attempt to create duplicate collection."""
    attrs = dict(namespace="pulp", name="squeezer", version="0.0.9")
    with self.assertRaises(ApiException) as ctx:
        self.upload_collection(**attrs)
    self.assertIn("Collection pulp.squeezer-0.0.9 already exists", ctx.exception.body)