mirror of
https://gitee.com/durcframework/SOP.git
synced 2025-08-11 21:57:56 +08:00
完善SDK
This commit is contained in:
@@ -40,11 +40,7 @@ class BaseRequest:
|
||||
raise Exception('未实现BaseRequest.get_request_type()方法')
|
||||
|
||||
def parse_response(self, response_dict):
|
||||
response_data = response_dict.get('error_response')
|
||||
if response_data is None:
|
||||
data_name = self.get_method().replace('.', '_') + '_response'
|
||||
response_data = response_dict.get(data_name)
|
||||
return response_data
|
||||
return response_dict
|
||||
|
||||
|
||||
|
||||
|
@@ -48,7 +48,7 @@ class MyTestCase(unittest.TestCase):
|
||||
# for f in files.values():
|
||||
# f.close()
|
||||
|
||||
if response.get('code') == '10000':
|
||||
if response.get('code') == '0':
|
||||
print 'response: ', response
|
||||
print 'is_vip:', response.get('member_info').get('is_vip', 0)
|
||||
else:
|
||||
|
Reference in New Issue
Block a user