Commit 40378c77 authored by Sofia Papagiannaki's avatar Sofia Papagiannaki
Browse files

pithos: Fix tests

parent 443234da
......@@ -711,7 +711,7 @@ class ContainerPut(PithosAPITest):
def test_create_twice(self):
self.assertTrue('c1' in self.list_containers(format=None))
r = self.create_container('c1')
r = self.create_container('c1')[-1]
self.assertEqual(r.status_code, 202)
self.assertTrue('c1' in self.list_containers(format=None))
......@@ -59,6 +59,28 @@ merkle = partial(merkle,
class ObjectHead(PithosAPITest):
def setUp(self):
cname = self.create_container()[0]
oname, odata = self.upload_object(cname)[:-1]
url = join_urls(self.pithos_path, cname, oname)
r = self.head(url)
map(lambda i: self.assertTrue(i in r),
class ObjectGet(PithosAPITest):
def setUp(self):
......@@ -406,7 +428,7 @@ class ObjectGet(PithosAPITest):
for t in t1_formats:
r = self.get(url, HTTP_IF_UNMODIFIED_SINCE=t)
self.assertEqual(r.status_code, 200)
self.assertEqual(odata, odata)
self.assertEqual(r.content, odata)
# modify object
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