'Test set/get raw logging subresource.'

def test_logging(self):

    bucket = self._MakeBucket()
    empty_logging_str = "<?xml    version='1.0'    encoding='UTF-8'?><Logging/>"
    logging_str = (("<?xml    version='1.0'    encoding='UTF-8'?><Logging><LogBucket>log-bucket</LogBucket>" + '<LogObjectPrefix>example</LogObjectPrefix>') + '</Logging>')
    bucket.set_subresource('logging', logging_str)
    self.assertEqual(bucket.get_subresource('logging'), logging_str)
    bucket.disable_logging()
    self.assertEqual(bucket.get_subresource('logging'), empty_logging_str)
    bucket.enable_logging('log-bucket', 'example')
    self.assertEqual(bucket.get_subresource('logging'), logging_str)
