Special characters now allowed in s3bucket_path keys. Fixes issue #78.

This commit is contained in:
Eric Lang 2014-01-07 12:59:10 -08:00
parent 531cd42e0f
commit fcb2542410
2 changed files with 3 additions and 3 deletions

View File

@ -16,5 +16,5 @@ url_paths = {
'{0}/$': bucket_response3,
'{0}/(?P<bucket_name>[a-zA-Z0-9\-_.]+)$': ro.bucket_response,
'{0}/(?P<bucket_name>[a-zA-Z0-9\-_.]+)/$': bucket_response2,
'{0}/(?P<bucket_name>[a-zA-Z0-9\-_./]+)/(?P<key_name>[a-zA-Z0-9\-_.?]+)': ro.key_response
'{0}/(?P<bucket_name>[a-zA-Z0-9\-_./]+)/(?P<key_name>.+)': ro.key_response
}

View File

@ -231,12 +231,12 @@ def test_key_with_special_characters():
conn = create_connection()
bucket = conn.create_bucket('test_bucket_name')
key = Key(bucket, 'test_list_keys_2/x?y')
key = Key(bucket, 'test_list_keys_2/*x+?^@~!y')
key.set_contents_from_string('value1')
key_list = bucket.list('test_list_keys_2/', '/')
keys = [x for x in key_list]
keys[0].name.should.equal("test_list_keys_2/x?y")
keys[0].name.should.equal("test_list_keys_2/*x+?^@~!y")
@mock_s3bucket_path