Commit d19b16cb authored by Łukasz Nowak's avatar Łukasz Nowak

Follow format changes: json in json.

parent 3ed9c776
...@@ -161,12 +161,15 @@ class TestShaDirExternal(ShaDirMixin, ShaSecurityMixin, ERP5TypeTestCase): ...@@ -161,12 +161,15 @@ class TestShaDirExternal(ShaDirMixin, ShaSecurityMixin, ERP5TypeTestCase):
If the data does not follow the schema it must return the error. If the data does not follow the schema it must return the error.
""" """
# Removing a required property # Removing a required property
self.data_list[0].pop('file') data = json.loads(self.data)
self.data = json.dumps(self.data_list) data[0] = json.loads(data[0])
data[0].pop('file')
data[0] = json.dumps(data[0])
data = json.dumps(data)
connection = httplib.HTTPConnection('%s:%s' % (self.host, self.port)) connection = httplib.HTTPConnection('%s:%s' % (self.host, self.port))
try: try:
connection.request('PUT', self.path, self.data, self.header_dict) connection.request('PUT', self.path, data, self.header_dict)
result = connection.getresponse() result = connection.getresponse()
transaction.commit() transaction.commit()
self.tic() self.tic()
......
25 26
\ No newline at end of file \ 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