]> git-server-git.apps.pok.os.sepia.ceph.com Git - s3-tests.git/commitdiff
Add test for keys with XML special characters 32/head
authorAndrew Gaul <andrew@gaul.org>
Tue, 30 Dec 2014 23:54:54 +0000 (15:54 -0800)
committerAndrew Gaul <andrew@gaul.org>
Tue, 30 Dec 2014 23:55:35 +0000 (15:55 -0800)
s3tests/functional/test_s3.py

index 44db1f191f38cfe5288067fe81546240b8cda8ae..0a9c86f87323c9a674d718979812084202e12a0c 100644 (file)
@@ -828,6 +828,20 @@ def test_object_read_notexist():
     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
 # seems to be a boto bug.  It happens with both amazon and dho.
 # http://code.google.com/p/boto/issues/detail?id=501