pytest-api-framework-alpha 0.3.19__tar.gz → 0.3.20__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pytest_api_framework_alpha-0.3.19 → pytest_api_framework_alpha-0.3.20}/PKG-INFO +1 -1
- {pytest_api_framework_alpha-0.3.19 → pytest_api_framework_alpha-0.3.20}/framework/base_class.py +12 -8
- {pytest_api_framework_alpha-0.3.19 → pytest_api_framework_alpha-0.3.20}/pytest_api_framework_alpha.egg-info/PKG-INFO +1 -1
- {pytest_api_framework_alpha-0.3.19 → pytest_api_framework_alpha-0.3.20}/setup.py +1 -1
- {pytest_api_framework_alpha-0.3.19 → pytest_api_framework_alpha-0.3.20}/framework/__init__.py +0 -0
- {pytest_api_framework_alpha-0.3.19 → pytest_api_framework_alpha-0.3.20}/framework/assert_webhook.py +0 -0
- {pytest_api_framework_alpha-0.3.19 → pytest_api_framework_alpha-0.3.20}/framework/conftest.py +0 -0
- {pytest_api_framework_alpha-0.3.19 → pytest_api_framework_alpha-0.3.20}/framework/db/__init__.py +0 -0
- {pytest_api_framework_alpha-0.3.19 → pytest_api_framework_alpha-0.3.20}/framework/db/mysql_db.py +0 -0
- {pytest_api_framework_alpha-0.3.19 → pytest_api_framework_alpha-0.3.20}/framework/db/redis_db.py +0 -0
- {pytest_api_framework_alpha-0.3.19 → pytest_api_framework_alpha-0.3.20}/framework/exceptions.py +0 -0
- {pytest_api_framework_alpha-0.3.19 → pytest_api_framework_alpha-0.3.20}/framework/exit_code.py +0 -0
- {pytest_api_framework_alpha-0.3.19 → pytest_api_framework_alpha-0.3.20}/framework/extract.py +0 -0
- {pytest_api_framework_alpha-0.3.19 → pytest_api_framework_alpha-0.3.20}/framework/global_attribute.py +0 -0
- {pytest_api_framework_alpha-0.3.19 → pytest_api_framework_alpha-0.3.20}/framework/http_client.py +0 -0
- {pytest_api_framework_alpha-0.3.19 → pytest_api_framework_alpha-0.3.20}/framework/render_data.py +0 -0
- {pytest_api_framework_alpha-0.3.19 → pytest_api_framework_alpha-0.3.20}/framework/report.py +0 -0
- {pytest_api_framework_alpha-0.3.19 → pytest_api_framework_alpha-0.3.20}/framework/retry_assert.py +0 -0
- {pytest_api_framework_alpha-0.3.19 → pytest_api_framework_alpha-0.3.20}/framework/script.py +0 -0
- {pytest_api_framework_alpha-0.3.19 → pytest_api_framework_alpha-0.3.20}/framework/startapp.py +0 -0
- {pytest_api_framework_alpha-0.3.19 → pytest_api_framework_alpha-0.3.20}/framework/utils/__init__.py +0 -0
- {pytest_api_framework_alpha-0.3.19 → pytest_api_framework_alpha-0.3.20}/framework/utils/common.py +0 -0
- {pytest_api_framework_alpha-0.3.19 → pytest_api_framework_alpha-0.3.20}/framework/utils/date_util.py +0 -0
- {pytest_api_framework_alpha-0.3.19 → pytest_api_framework_alpha-0.3.20}/framework/utils/encrypt.py +0 -0
- {pytest_api_framework_alpha-0.3.19 → pytest_api_framework_alpha-0.3.20}/framework/utils/lark_util.py +0 -0
- {pytest_api_framework_alpha-0.3.19 → pytest_api_framework_alpha-0.3.20}/framework/utils/log_util.py +0 -0
- {pytest_api_framework_alpha-0.3.19 → pytest_api_framework_alpha-0.3.20}/framework/utils/mock_util.py +0 -0
- {pytest_api_framework_alpha-0.3.19 → pytest_api_framework_alpha-0.3.20}/framework/utils/yaml_util.py +0 -0
- {pytest_api_framework_alpha-0.3.19 → pytest_api_framework_alpha-0.3.20}/framework/validate.py +0 -0
- {pytest_api_framework_alpha-0.3.19 → pytest_api_framework_alpha-0.3.20}/pytest_api_framework_alpha.egg-info/SOURCES.txt +0 -0
- {pytest_api_framework_alpha-0.3.19 → pytest_api_framework_alpha-0.3.20}/pytest_api_framework_alpha.egg-info/dependency_links.txt +0 -0
- {pytest_api_framework_alpha-0.3.19 → pytest_api_framework_alpha-0.3.20}/pytest_api_framework_alpha.egg-info/requires.txt +0 -0
- {pytest_api_framework_alpha-0.3.19 → pytest_api_framework_alpha-0.3.20}/pytest_api_framework_alpha.egg-info/top_level.txt +0 -0
- {pytest_api_framework_alpha-0.3.19 → pytest_api_framework_alpha-0.3.20}/setup.cfg +0 -0
{pytest_api_framework_alpha-0.3.19 → pytest_api_framework_alpha-0.3.20}/framework/base_class.py
RENAMED
|
@@ -7,7 +7,6 @@ from typing import Union
|
|
|
7
7
|
from dataclasses import dataclass
|
|
8
8
|
from datetime import datetime, timedelta
|
|
9
9
|
from urllib.parse import urlparse, urlunparse, urljoin
|
|
10
|
-
from adodbapi.apibase import pythonTimeConverter
|
|
11
10
|
|
|
12
11
|
import pytest
|
|
13
12
|
from box import Box
|
|
@@ -189,17 +188,21 @@ class BaseTestCase(ExtendBaseTestCase):
|
|
|
189
188
|
:return:
|
|
190
189
|
"""
|
|
191
190
|
account_info = self.context.get(self.belong_app).get("accounts").get(account)
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
191
|
+
info = self.mysql_conn("db_camp_crm").query(
|
|
192
|
+
f"SELECT webhook_url FROM tbl_participant WHERE participant_code = '{account_info.client_id}';",
|
|
193
|
+
log=False)
|
|
194
|
+
if not info:
|
|
195
|
+
# self.logger.warning(f"账号{account}未配置webhook地址")
|
|
196
|
+
return None
|
|
197
|
+
original_webhook_url = info.get("webhook_url").rsplit("/", 1)[0]
|
|
196
198
|
new_webhook_url = f"{original_webhook_url}/{str(uuid.uuid4()).replace("-", "_")}"
|
|
197
199
|
try:
|
|
198
200
|
self.mysql_conn("db_camp_crm").execute(
|
|
199
|
-
f"UPDATE tbl_participant set webhook_url = '{new_webhook_url}' WHERE participant_code = '{account_info.client_id}';",
|
|
201
|
+
f"UPDATE tbl_participant set webhook_url = '{new_webhook_url}' WHERE participant_code = '{account_info.client_id}';",
|
|
202
|
+
log=False)
|
|
200
203
|
self.context_set(f"{account_info.client_id}_webhook", urlparse(new_webhook_url).path)
|
|
201
204
|
except Exception as e:
|
|
202
|
-
self.logger.error(f"修改webhook地址异常: {e}")
|
|
205
|
+
self.logger.error(f"账号{account}修改webhook地址异常: {e}")
|
|
203
206
|
|
|
204
207
|
def get_webhook(self, account, count=None, timeout=GET_WEBHOOK_TIMEOUT, interval=GET_WEBHOOK_TRIES):
|
|
205
208
|
"""
|
|
@@ -213,8 +216,9 @@ class BaseTestCase(ExtendBaseTestCase):
|
|
|
213
216
|
"""
|
|
214
217
|
account_info = self.context.get(self.belong_app).get("accounts").get(account)
|
|
215
218
|
webhook_url = self.context_get(f"{account_info.client_id}_webhook")
|
|
219
|
+
|
|
216
220
|
if not webhook_url:
|
|
217
|
-
self.logger.warning(f"账号{account}
|
|
221
|
+
self.logger.warning(f"账号{account}未配置webhook地址")
|
|
218
222
|
return
|
|
219
223
|
webhook_url = webhook_url.replace("/webhook_vmock", "")
|
|
220
224
|
base64_webhook_url = b64_encode(webhook_url.encode("utf8"))
|
{pytest_api_framework_alpha-0.3.19 → pytest_api_framework_alpha-0.3.20}/framework/__init__.py
RENAMED
|
File without changes
|
{pytest_api_framework_alpha-0.3.19 → pytest_api_framework_alpha-0.3.20}/framework/assert_webhook.py
RENAMED
|
File without changes
|
{pytest_api_framework_alpha-0.3.19 → pytest_api_framework_alpha-0.3.20}/framework/conftest.py
RENAMED
|
File without changes
|
{pytest_api_framework_alpha-0.3.19 → pytest_api_framework_alpha-0.3.20}/framework/db/__init__.py
RENAMED
|
File without changes
|
{pytest_api_framework_alpha-0.3.19 → pytest_api_framework_alpha-0.3.20}/framework/db/mysql_db.py
RENAMED
|
File without changes
|
{pytest_api_framework_alpha-0.3.19 → pytest_api_framework_alpha-0.3.20}/framework/db/redis_db.py
RENAMED
|
File without changes
|
{pytest_api_framework_alpha-0.3.19 → pytest_api_framework_alpha-0.3.20}/framework/exceptions.py
RENAMED
|
File without changes
|
{pytest_api_framework_alpha-0.3.19 → pytest_api_framework_alpha-0.3.20}/framework/exit_code.py
RENAMED
|
File without changes
|
{pytest_api_framework_alpha-0.3.19 → pytest_api_framework_alpha-0.3.20}/framework/extract.py
RENAMED
|
File without changes
|
|
File without changes
|
{pytest_api_framework_alpha-0.3.19 → pytest_api_framework_alpha-0.3.20}/framework/http_client.py
RENAMED
|
File without changes
|
{pytest_api_framework_alpha-0.3.19 → pytest_api_framework_alpha-0.3.20}/framework/render_data.py
RENAMED
|
File without changes
|
|
File without changes
|
{pytest_api_framework_alpha-0.3.19 → pytest_api_framework_alpha-0.3.20}/framework/retry_assert.py
RENAMED
|
File without changes
|
|
File without changes
|
{pytest_api_framework_alpha-0.3.19 → pytest_api_framework_alpha-0.3.20}/framework/startapp.py
RENAMED
|
File without changes
|
{pytest_api_framework_alpha-0.3.19 → pytest_api_framework_alpha-0.3.20}/framework/utils/__init__.py
RENAMED
|
File without changes
|
{pytest_api_framework_alpha-0.3.19 → pytest_api_framework_alpha-0.3.20}/framework/utils/common.py
RENAMED
|
File without changes
|
{pytest_api_framework_alpha-0.3.19 → pytest_api_framework_alpha-0.3.20}/framework/utils/date_util.py
RENAMED
|
File without changes
|
{pytest_api_framework_alpha-0.3.19 → pytest_api_framework_alpha-0.3.20}/framework/utils/encrypt.py
RENAMED
|
File without changes
|
{pytest_api_framework_alpha-0.3.19 → pytest_api_framework_alpha-0.3.20}/framework/utils/lark_util.py
RENAMED
|
File without changes
|
{pytest_api_framework_alpha-0.3.19 → pytest_api_framework_alpha-0.3.20}/framework/utils/log_util.py
RENAMED
|
File without changes
|
{pytest_api_framework_alpha-0.3.19 → pytest_api_framework_alpha-0.3.20}/framework/utils/mock_util.py
RENAMED
|
File without changes
|
{pytest_api_framework_alpha-0.3.19 → pytest_api_framework_alpha-0.3.20}/framework/utils/yaml_util.py
RENAMED
|
File without changes
|
{pytest_api_framework_alpha-0.3.19 → pytest_api_framework_alpha-0.3.20}/framework/validate.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|