Commit 520bf509 authored by Łukasz Nowak's avatar Łukasz Nowak

Now the API is json in json.

parent 92b47386
......@@ -77,13 +77,13 @@ class ShaDirMixin(object):
libc_version = '%s %s' % (platform.libc_ver()[0], platform.libc_ver()[1])
self.architecture = '%s %s' % (platform.machine(), libc_version)
self.data_list = [{'file': self.file_name,
self.data_list = [json.dumps({'file': self.file_name,
'urlmd5': self.urlmd5,
'sha512': self.file_sha512sum,
'creation_date': str(self.creation_date),
'expiration_date': str(self.expiration_date),
'distribution': self.distribution,
'architecture': self.architecture},
'architecture': self.architecture}),
"User SIGNATURE goes here."]
self.data = json.dumps(self.data_list)
......
......@@ -226,13 +226,13 @@ class TestShaDir(ShaDirMixin, ERP5TypeTestCase):
urlmd5_2 = 'anotherurlmd5' + str(random.random())
sha512_2 = 'anothersha512_2' + str(random.random())
key_2 = 'another_key' + str(random.random())
data_list_2 = [{'file': self.file_name,
data_list_2 = [json.dumps({'file': self.file_name,
'urlmd5': urlmd5_2,
'sha512': sha512_2,
'creation_date': str(self.creation_date),
'expiration_date': str(self.expiration_date),
'distribution': self.distribution,
'architecture': self.architecture},
'architecture': self.architecture}),
"User SIGNATURE goes here."]
data_2 = json.dumps(data_list_2)
self.postInformation(key_2, data_2)
......
69
\ No newline at end of file
70
\ No newline at end of file
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