don't delete key in atomic gone test

The key hasn't been written to the server so it doesn't need a delete
This commit is contained in:
Stephon Striplin 2011-08-29 12:36:00 -07:00
parent 3d775a02f4
commit eeaeec573b

View file

@ -2207,14 +2207,13 @@ def test_atomic_dual_write_8mb():
@attr('fails_on_aws') @attr('fails_on_aws')
def test_atomic_write_bucket_gone(): def test_atomic_write_bucket_gone():
bucket = get_new_bucket() bucket = get_new_bucket()
key = bucket.new_key('foo')
def remove_bucket(): def remove_bucket():
key.delete()
bucket.delete() bucket.delete()
# create file of A's but delete the bucket it's in before we finish writing # create file of A's but delete the bucket it's in before we finish writing
# all of them # all of them
key = bucket.new_key('foo')
fp_a = FakeFile(1024*1024, 'A', remove_bucket) fp_a = FakeFile(1024*1024, 'A', remove_bucket)
e = assert_raises(boto.exception.S3ResponseError, key.set_contents_from_file, fp_a) e = assert_raises(boto.exception.S3ResponseError, key.set_contents_from_file, fp_a)
eq(e.status, 404) eq(e.status, 404)