forked from TrueCloudLab/s3-tests
Merge pull request #32 from andrewgaul/xml-special-characters
Add test for keys with XML special characters Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
This commit is contained in:
commit
6582a28395
1 changed files with 14 additions and 0 deletions
|
@ -831,6 +831,20 @@ def test_object_read_notexist():
|
||||||
eq(e.error_code, 'NoSuchKey')
|
eq(e.error_code, 'NoSuchKey')
|
||||||
|
|
||||||
|
|
||||||
|
@attr(resource='object')
|
||||||
|
@attr(method='put')
|
||||||
|
@attr(operation='write to special characters key')
|
||||||
|
@attr(assertion='fails 404')
|
||||||
|
def test_object_create_special_characters():
|
||||||
|
bucket = get_new_bucket()
|
||||||
|
# sourced from: http://xml.silmaril.ie/specials.html
|
||||||
|
key = bucket.new_key('<&>"\'')
|
||||||
|
key.set_contents_from_string('bar')
|
||||||
|
got = key.get_contents_as_string()
|
||||||
|
eq(got, 'bar')
|
||||||
|
bucket.get_all_keys()
|
||||||
|
|
||||||
|
|
||||||
# While the test itself passes, there's a SAX parser error during teardown. It
|
# While the test itself passes, there's a SAX parser error during teardown. It
|
||||||
# seems to be a boto bug. It happens with both amazon and dho.
|
# seems to be a boto bug. It happens with both amazon and dho.
|
||||||
# http://code.google.com/p/boto/issues/detail?id=501
|
# http://code.google.com/p/boto/issues/detail?id=501
|
||||||
|
|
Loading…
Reference in a new issue