pytest-api-framework-alpha 0.3.22__tar.gz → 0.3.23__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.22 → pytest_api_framework_alpha-0.3.23}/PKG-INFO +1 -1
- {pytest_api_framework_alpha-0.3.22 → pytest_api_framework_alpha-0.3.23}/framework/base_class.py +7 -6
- {pytest_api_framework_alpha-0.3.22 → pytest_api_framework_alpha-0.3.23}/pytest_api_framework_alpha.egg-info/PKG-INFO +1 -1
- {pytest_api_framework_alpha-0.3.22 → pytest_api_framework_alpha-0.3.23}/setup.py +1 -1
- {pytest_api_framework_alpha-0.3.22 → pytest_api_framework_alpha-0.3.23}/framework/__init__.py +0 -0
- {pytest_api_framework_alpha-0.3.22 → pytest_api_framework_alpha-0.3.23}/framework/assert_webhook.py +0 -0
- {pytest_api_framework_alpha-0.3.22 → pytest_api_framework_alpha-0.3.23}/framework/conftest.py +0 -0
- {pytest_api_framework_alpha-0.3.22 → pytest_api_framework_alpha-0.3.23}/framework/db/__init__.py +0 -0
- {pytest_api_framework_alpha-0.3.22 → pytest_api_framework_alpha-0.3.23}/framework/db/mysql_db.py +0 -0
- {pytest_api_framework_alpha-0.3.22 → pytest_api_framework_alpha-0.3.23}/framework/db/redis_db.py +0 -0
- {pytest_api_framework_alpha-0.3.22 → pytest_api_framework_alpha-0.3.23}/framework/exceptions.py +0 -0
- {pytest_api_framework_alpha-0.3.22 → pytest_api_framework_alpha-0.3.23}/framework/exit_code.py +0 -0
- {pytest_api_framework_alpha-0.3.22 → pytest_api_framework_alpha-0.3.23}/framework/extract.py +0 -0
- {pytest_api_framework_alpha-0.3.22 → pytest_api_framework_alpha-0.3.23}/framework/global_attribute.py +0 -0
- {pytest_api_framework_alpha-0.3.22 → pytest_api_framework_alpha-0.3.23}/framework/http_client.py +0 -0
- {pytest_api_framework_alpha-0.3.22 → pytest_api_framework_alpha-0.3.23}/framework/render_data.py +0 -0
- {pytest_api_framework_alpha-0.3.22 → pytest_api_framework_alpha-0.3.23}/framework/report.py +0 -0
- {pytest_api_framework_alpha-0.3.22 → pytest_api_framework_alpha-0.3.23}/framework/retry_assert.py +0 -0
- {pytest_api_framework_alpha-0.3.22 → pytest_api_framework_alpha-0.3.23}/framework/script.py +0 -0
- {pytest_api_framework_alpha-0.3.22 → pytest_api_framework_alpha-0.3.23}/framework/startapp.py +0 -0
- {pytest_api_framework_alpha-0.3.22 → pytest_api_framework_alpha-0.3.23}/framework/utils/__init__.py +0 -0
- {pytest_api_framework_alpha-0.3.22 → pytest_api_framework_alpha-0.3.23}/framework/utils/common.py +0 -0
- {pytest_api_framework_alpha-0.3.22 → pytest_api_framework_alpha-0.3.23}/framework/utils/date_util.py +0 -0
- {pytest_api_framework_alpha-0.3.22 → pytest_api_framework_alpha-0.3.23}/framework/utils/encrypt.py +0 -0
- {pytest_api_framework_alpha-0.3.22 → pytest_api_framework_alpha-0.3.23}/framework/utils/lark_util.py +0 -0
- {pytest_api_framework_alpha-0.3.22 → pytest_api_framework_alpha-0.3.23}/framework/utils/log_util.py +0 -0
- {pytest_api_framework_alpha-0.3.22 → pytest_api_framework_alpha-0.3.23}/framework/utils/mock_util.py +0 -0
- {pytest_api_framework_alpha-0.3.22 → pytest_api_framework_alpha-0.3.23}/framework/utils/yaml_util.py +0 -0
- {pytest_api_framework_alpha-0.3.22 → pytest_api_framework_alpha-0.3.23}/framework/validate.py +0 -0
- {pytest_api_framework_alpha-0.3.22 → pytest_api_framework_alpha-0.3.23}/pytest_api_framework_alpha.egg-info/SOURCES.txt +0 -0
- {pytest_api_framework_alpha-0.3.22 → pytest_api_framework_alpha-0.3.23}/pytest_api_framework_alpha.egg-info/dependency_links.txt +0 -0
- {pytest_api_framework_alpha-0.3.22 → pytest_api_framework_alpha-0.3.23}/pytest_api_framework_alpha.egg-info/requires.txt +0 -0
- {pytest_api_framework_alpha-0.3.22 → pytest_api_framework_alpha-0.3.23}/pytest_api_framework_alpha.egg-info/top_level.txt +0 -0
- {pytest_api_framework_alpha-0.3.22 → pytest_api_framework_alpha-0.3.23}/setup.cfg +0 -0
{pytest_api_framework_alpha-0.3.22 → pytest_api_framework_alpha-0.3.23}/framework/base_class.py
RENAMED
|
@@ -71,7 +71,6 @@ class BaseTestCase(ExtendBaseTestCase):
|
|
|
71
71
|
data = RenderData(data).render()
|
|
72
72
|
data.request.url = self.replace_domain(data.request.url, domain)
|
|
73
73
|
try:
|
|
74
|
-
self.set_webhook_url(app, account)
|
|
75
74
|
self.response = getattr(app_http, account, HttpClient()).request(data=data, **kwargs)
|
|
76
75
|
except AttributeError as e:
|
|
77
76
|
raise GetAccountError(e)
|
|
@@ -181,13 +180,14 @@ class BaseTestCase(ExtendBaseTestCase):
|
|
|
181
180
|
)
|
|
182
181
|
return urlunparse(updated_url)
|
|
183
182
|
|
|
184
|
-
def set_webhook_url(self,
|
|
183
|
+
def set_webhook_url(self, account, app=None):
|
|
185
184
|
"""
|
|
186
185
|
修改webhook url地址,在原地址基础上拼接上/uuid,保证地址唯一
|
|
187
|
-
:param app:
|
|
188
186
|
:param account: 账户名
|
|
187
|
+
:param app:
|
|
189
188
|
:return:
|
|
190
189
|
"""
|
|
190
|
+
app = self.default_app(app)
|
|
191
191
|
account_info = self.context.get(app).get("accounts").get(account)
|
|
192
192
|
try:
|
|
193
193
|
info = self.mysql_conn("db_camp_crm").query(
|
|
@@ -195,9 +195,9 @@ class BaseTestCase(ExtendBaseTestCase):
|
|
|
195
195
|
log=False)
|
|
196
196
|
if not info.get("webhook_url"):
|
|
197
197
|
# self.logger.warning(f"账号{account}未配置webhook地址")
|
|
198
|
-
return
|
|
198
|
+
return self
|
|
199
199
|
except Exception as e:
|
|
200
|
-
return
|
|
200
|
+
return self
|
|
201
201
|
original_webhook_url = info.get("webhook_url").rsplit("/", 1)[0]
|
|
202
202
|
new_webhook_url = f"{original_webhook_url}/{str(uuid.uuid4()).replace("-", "_")}"
|
|
203
203
|
try:
|
|
@@ -207,6 +207,7 @@ class BaseTestCase(ExtendBaseTestCase):
|
|
|
207
207
|
self.context_set(f"{account_info.client_id}_webhook", urlparse(new_webhook_url).path)
|
|
208
208
|
except Exception as e:
|
|
209
209
|
self.logger.error(f"账号{account}修改webhook地址异常: {e}")
|
|
210
|
+
return self
|
|
210
211
|
|
|
211
212
|
def get_webhook(self, account, count=None, timeout=GET_WEBHOOK_TIMEOUT, interval=GET_WEBHOOK_TRIES):
|
|
212
213
|
"""
|
|
@@ -336,7 +337,7 @@ class BaseTestCase(ExtendBaseTestCase):
|
|
|
336
337
|
:param partner_account: partner账号
|
|
337
338
|
:param merchant_participant_code: merchant code
|
|
338
339
|
:param buyer_participant_code: buyer code
|
|
339
|
-
:return:
|
|
340
|
+
:return:
|
|
340
341
|
"""
|
|
341
342
|
# 删除wallet_service中的钱包
|
|
342
343
|
self.logger.info(f"重置{buyer_participant_code}热钱包")
|
{pytest_api_framework_alpha-0.3.22 → pytest_api_framework_alpha-0.3.23}/framework/__init__.py
RENAMED
|
File without changes
|
{pytest_api_framework_alpha-0.3.22 → pytest_api_framework_alpha-0.3.23}/framework/assert_webhook.py
RENAMED
|
File without changes
|
{pytest_api_framework_alpha-0.3.22 → pytest_api_framework_alpha-0.3.23}/framework/conftest.py
RENAMED
|
File without changes
|
{pytest_api_framework_alpha-0.3.22 → pytest_api_framework_alpha-0.3.23}/framework/db/__init__.py
RENAMED
|
File without changes
|
{pytest_api_framework_alpha-0.3.22 → pytest_api_framework_alpha-0.3.23}/framework/db/mysql_db.py
RENAMED
|
File without changes
|
{pytest_api_framework_alpha-0.3.22 → pytest_api_framework_alpha-0.3.23}/framework/db/redis_db.py
RENAMED
|
File without changes
|
{pytest_api_framework_alpha-0.3.22 → pytest_api_framework_alpha-0.3.23}/framework/exceptions.py
RENAMED
|
File without changes
|
{pytest_api_framework_alpha-0.3.22 → pytest_api_framework_alpha-0.3.23}/framework/exit_code.py
RENAMED
|
File without changes
|
{pytest_api_framework_alpha-0.3.22 → pytest_api_framework_alpha-0.3.23}/framework/extract.py
RENAMED
|
File without changes
|
|
File without changes
|
{pytest_api_framework_alpha-0.3.22 → pytest_api_framework_alpha-0.3.23}/framework/http_client.py
RENAMED
|
File without changes
|
{pytest_api_framework_alpha-0.3.22 → pytest_api_framework_alpha-0.3.23}/framework/render_data.py
RENAMED
|
File without changes
|
|
File without changes
|
{pytest_api_framework_alpha-0.3.22 → pytest_api_framework_alpha-0.3.23}/framework/retry_assert.py
RENAMED
|
File without changes
|
|
File without changes
|
{pytest_api_framework_alpha-0.3.22 → pytest_api_framework_alpha-0.3.23}/framework/startapp.py
RENAMED
|
File without changes
|
{pytest_api_framework_alpha-0.3.22 → pytest_api_framework_alpha-0.3.23}/framework/utils/__init__.py
RENAMED
|
File without changes
|
{pytest_api_framework_alpha-0.3.22 → pytest_api_framework_alpha-0.3.23}/framework/utils/common.py
RENAMED
|
File without changes
|
{pytest_api_framework_alpha-0.3.22 → pytest_api_framework_alpha-0.3.23}/framework/utils/date_util.py
RENAMED
|
File without changes
|
{pytest_api_framework_alpha-0.3.22 → pytest_api_framework_alpha-0.3.23}/framework/utils/encrypt.py
RENAMED
|
File without changes
|
{pytest_api_framework_alpha-0.3.22 → pytest_api_framework_alpha-0.3.23}/framework/utils/lark_util.py
RENAMED
|
File without changes
|
{pytest_api_framework_alpha-0.3.22 → pytest_api_framework_alpha-0.3.23}/framework/utils/log_util.py
RENAMED
|
File without changes
|
{pytest_api_framework_alpha-0.3.22 → pytest_api_framework_alpha-0.3.23}/framework/utils/mock_util.py
RENAMED
|
File without changes
|
{pytest_api_framework_alpha-0.3.22 → pytest_api_framework_alpha-0.3.23}/framework/utils/yaml_util.py
RENAMED
|
File without changes
|
{pytest_api_framework_alpha-0.3.22 → pytest_api_framework_alpha-0.3.23}/framework/validate.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|