def test_s3_get_deep_archive_object(self):
    bucket_name = ('bucket-%s' % short_uid())
    object_key = ('key-%s' % short_uid())
    self.s3_client.create_bucket(Bucket=bucket_name)
    self.s3_client.put_object(Bucket=bucket_name, Key=object_key, Body='body data', StorageClass='DEEP_ARCHIVE')
    with self.assertRaises(ClientError) as ctx:
        self.s3_client.get_object(Bucket=bucket_name, Key=object_key)
    self.assertIn('InvalidObjectState', str(ctx.exception))
    self._delete_bucket(bucket_name, [object_key])
def test_s3_get_deep_archive_object(self):
    bucket_name = ('bucket-%s' % short_uid())
    object_key = ('key-%s' % short_uid())
    self.s3_client.create_bucket(Bucket=bucket_name)
    self.s3_client.put_object(Bucket=bucket_name, Key=object_key, Body='body data', StorageClass='DEEP_ARCHIVE')
    with self.assertRaises(ClientError) as ctx:
        self.s3_client.get_object(Bucket=bucket_name, Key=object_key)
    self.assertIn('InvalidObjectState', str(ctx.exception))
    self._delete_bucket(bucket_name, [object_key])