|
@@ -1,7 +1,7 @@
|
|
"""
|
|
"""
|
|
功能测试http接口
|
|
功能测试http接口
|
|
"""
|
|
"""
|
|
-
|
|
|
|
|
|
+import time
|
|
from flask import Blueprint, request, jsonify
|
|
from flask import Blueprint, request, jsonify
|
|
|
|
|
|
from watermark_generate.exceptions import BusinessException
|
|
from watermark_generate.exceptions import BusinessException
|
|
@@ -66,6 +66,7 @@ def test_generate_label():
|
|
data = request.json
|
|
data = request.json
|
|
logger.info(f'test generate label: {data}')
|
|
logger.info(f'test generate label: {data}')
|
|
raw_data = data.get('raw_data')
|
|
raw_data = data.get('raw_data')
|
|
|
|
+ raw_data = str(int(time.time()))
|
|
if raw_data is None:
|
|
if raw_data is None:
|
|
raise BusinessException(message='原文值不可为空', code=-1)
|
|
raise BusinessException(message='原文值不可为空', code=-1)
|
|
secret_label, public_key = secret_label_func.generate_secret_label(raw_data)
|
|
secret_label, public_key = secret_label_func.generate_secret_label(raw_data)
|