'Test setting and getting of CORS XML documents on Bucket.'

def test_cors_xml_bucket(self):

    bucket = self._MakeBucket()
    bucket_name = bucket.name
    bucket = self._GetConnection().get_bucket(bucket_name)
    cors = re.sub('\\s', '', bucket.get_cors().to_xml())
    self.assertEqual(cors, CORS_EMPTY)
    bucket.set_cors(CORS_DOC)
    cors = re.sub('\\s', '', bucket.get_cors().to_xml())
    self.assertEqual(cors, CORS_DOC)
