Merge pull request #79 from Zulunko/master

Enables the usage of special characters in keys when using s3bucket_path
This commit is contained in:
Steve Pulec 2014-01-11 17:25:56 -08:00
commit f6e166c96d
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