Commit 0a2ef6d5 authored by Łukasz Nowak's avatar Łukasz Nowak

Follow spec and compat changes.

parent 8b5ff3ad
......@@ -196,14 +196,14 @@ class OnlineTest(OnlineMixin, unittest.TestCase):
"""Check scenario with shadir used"""
nc = NetworkcacheClient(self.shacache, self.shadir)
urlmd5 = str(random.random())
nc.upload(self.test_data, urlmd5, file_name='my file')
nc.upload(self.test_data, 'mykey', urlmd5=urlmd5, file_name='my file')
def test_upload_shadir_select(self):
"""Check scenario with shadir used"""
nc = NetworkcacheClient(self.shacache, self.shadir)
urlmd5 = str(random.random())
key = 'somekey' + str(random.random())
nc.upload(self.test_data, urlmd5, file_name='my file', key=key)
nc.upload(self.test_data, key, urlmd5=urlmd5, file_name='my file')
result = nc.select(key)
self.assertEqual(result.read(), self.test_string)
......@@ -211,8 +211,8 @@ class OnlineTest(OnlineMixin, unittest.TestCase):
"""Check scenario with shadir used, but not filename passed"""
nc = NetworkcacheClient(self.shacache, self.shadir)
urlmd5 = str(random.random())
self.assertRaises(ValueError, nc.upload, self.test_data, urlmd5,
key='somekey')
self.assertRaises(ValueError, nc.upload, self.test_data, 'somekey',
urlmd5)
def test_upload_twice_same(self):
nc = NetworkcacheClient(self.shacache, self.shadir)
......
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