Commit 4139f205 authored by Sofia Papagiannaki's avatar Sofia Papagiannaki

pithos: Update tests

Add check for bad characters in Content-Type headers.
parent e284aa2a
......@@ -608,6 +608,9 @@ class ObjectPut(PithosAPITest):
headers['HTTP_CONTENT_DISPOSITION'] = ('attachment; filename="%s"' %
oname)
url = join_urls(self.pithos_path, self.user, cname, oname)
r = self.put(url, data=data, content_type='㌀', **headers)
self.assertEqual(r.status_code, 400)
r = self.put(url, data=data, content_type='application/pdf', **headers)
self.assertEqual(r.status_code, 201)
self.assertTrue('ETag' in r)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment