fix unittest

This commit is contained in:
debugtalk
2019-04-04 15:36:58 +08:00
parent d7b76b2fcc
commit c6f41b84e6
11 changed files with 18 additions and 19 deletions

View File

@@ -93,15 +93,13 @@ def index():
@app.route('/api/get-token', methods=['POST'])
def get_token():
user_agent = request.headers.get('User-Agent', "")
device_sn = request.headers.get('device_sn', "")
os_platform = request.headers.get('os_platform', "")
app_version = request.headers.get('app_version', "")
data = request.get_json()
sign = data.get('sign', "")
expected_sign = get_sign(user_agent, device_sn, os_platform, app_version)
expected_sign = get_sign(device_sn, os_platform, app_version)
if expected_sign != sign:
result = {
'success': False,