From 820104b31f53e5ec78c560187aa8e2183fb7df05 Mon Sep 17 00:00:00 2001 From: Tommi Virtanen Date: Mon, 4 Apr 2011 17:03:18 -0700 Subject: [PATCH] More precise test for rgw bad error message. --- test_s3.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test_s3.py b/test_s3.py index d5f9bb1..75013bf 100644 --- a/test_s3.py +++ b/test_s3.py @@ -184,6 +184,17 @@ def test_bucket_list_empty(): eq(l, []) +# TODO rgw gives NoSuchKey instead of NoSuchBucket +@attr('fails_on_rgw') +def test_bucket_notexist(): + name = '{prefix}foo'.format(prefix=prefix) + print 'Trying bucket {name!r}'.format(name=name) + e = assert_raises(boto.exception.S3ResponseError, s3.main.get_bucket, name) + eq(e.status, 404) + eq(e.reason, 'Not Found') + eq(e.error_code, 'NoSuchBucket') + + # TODO rgw gives NoSuchKey instead of NoSuchBucket @attr('fails_on_rgw') def test_bucket_create_delete():