]> git-server-git.apps.pok.os.sepia.ceph.com Git - s3-tests.git/commitdiff
fix test_bucket_acl_grant_nonexist_user
authorStephon Striplin <stephon.striplin@dreamhost.com>
Fri, 15 Jul 2011 21:57:46 +0000 (14:57 -0700)
committerStephon Striplin <stephon.striplin@dreamhost.com>
Fri, 15 Jul 2011 21:57:46 +0000 (14:57 -0700)
* Change user_id to avoid name conflict
* Check for error_code

s3tests/functional/test_s3.py

index b31215a42e5de2537da949b6c38d9ffc6f0cb6c4..81922160fd51fab5fdf44d2ba334871b115b48c4 100644 (file)
@@ -888,13 +888,14 @@ def test_bucket_acl_grant_userid_write():
 def test_bucket_acl_grant_nonexist_user():
     bucket = get_new_bucket()
     # add alt user
-    bad_user_id = 'foo'
+    bad_user_id = '_foo'
     policy = bucket.get_acl()
     policy.acl.add_user_grant('FULL_CONTROL', bad_user_id)
     print policy.to_xml()
     e = assert_raises(boto.exception.S3ResponseError, bucket.set_acl, policy)
     eq(e.status, 400)
     eq(e.reason, 'Bad Request')
+    eq(e.error_code, 'InvalidArgument')
 
 
 # This test will fail on DH Objects. DHO allows multiple users with one account, which