]> git-server-git.apps.pok.os.sepia.ceph.com Git - s3-tests.git/commitdiff
Consolidate test_object_create_special_characters 77/head
authorAndrew Gaul <andrew@gaul.org>
Fri, 11 Sep 2015 17:50:14 +0000 (10:50 -0700)
committerAndrew Gaul <andrew@gaul.org>
Fri, 11 Sep 2015 17:52:43 +0000 (10:52 -0700)
test_bucket_create_special_key_names duplicates this test.  Add
missing cases and reformat for clarity.

Signed-off-by: Andrew Gaul <andrew@gaul.org>
s3tests/functional/test_s3.py

index cbc5af0297cb3f82f846b1d5a10395f473f65f55..d90cd745d2eaa6f02156a44e56b7c3ce5819e559 100644 (file)
@@ -833,20 +833,6 @@ 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
@@ -4368,7 +4354,20 @@ def test_bucket_recreate_not_overriding():
 @attr(operation='create and list objects with special names')
 @attr(assertion='special names work')
 def test_bucket_create_special_key_names():
-    key_names = [' ', '%', '_', '_ ', '_ _', '__']
+    key_names = [
+        ' ',
+        '"',
+        '$',
+        '%',
+        '&',
+        '\'',
+        '<',
+        '>',
+        '_',
+        '_ ',
+        '_ _',
+        '__',
+    ]
     bucket = _create_keys(keys=key_names)
 
     li = bucket.list()