pytest-api-framework-alpha 0.3.12__tar.gz → 0.3.14__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.12 → pytest_api_framework_alpha-0.3.14}/PKG-INFO +1 -1
- {pytest_api_framework_alpha-0.3.12 → pytest_api_framework_alpha-0.3.14}/framework/base_class.py +4 -4
- {pytest_api_framework_alpha-0.3.12 → pytest_api_framework_alpha-0.3.14}/framework/conftest.py +4 -3
- {pytest_api_framework_alpha-0.3.12 → pytest_api_framework_alpha-0.3.14}/framework/db/mysql_db.py +11 -5
- {pytest_api_framework_alpha-0.3.12 → pytest_api_framework_alpha-0.3.14}/pytest_api_framework_alpha.egg-info/PKG-INFO +1 -1
- {pytest_api_framework_alpha-0.3.12 → pytest_api_framework_alpha-0.3.14}/setup.py +1 -1
- {pytest_api_framework_alpha-0.3.12 → pytest_api_framework_alpha-0.3.14}/framework/__init__.py +0 -0
- {pytest_api_framework_alpha-0.3.12 → pytest_api_framework_alpha-0.3.14}/framework/db/__init__.py +0 -0
- {pytest_api_framework_alpha-0.3.12 → pytest_api_framework_alpha-0.3.14}/framework/db/redis_db.py +0 -0
- {pytest_api_framework_alpha-0.3.12 → pytest_api_framework_alpha-0.3.14}/framework/exceptions.py +0 -0
- {pytest_api_framework_alpha-0.3.12 → pytest_api_framework_alpha-0.3.14}/framework/exit_code.py +0 -0
- {pytest_api_framework_alpha-0.3.12 → pytest_api_framework_alpha-0.3.14}/framework/extract.py +0 -0
- {pytest_api_framework_alpha-0.3.12 → pytest_api_framework_alpha-0.3.14}/framework/global_attribute.py +0 -0
- {pytest_api_framework_alpha-0.3.12 → pytest_api_framework_alpha-0.3.14}/framework/http_client.py +0 -0
- {pytest_api_framework_alpha-0.3.12 → pytest_api_framework_alpha-0.3.14}/framework/render_data.py +0 -0
- {pytest_api_framework_alpha-0.3.12 → pytest_api_framework_alpha-0.3.14}/framework/report.py +0 -0
- {pytest_api_framework_alpha-0.3.12 → pytest_api_framework_alpha-0.3.14}/framework/script.py +0 -0
- {pytest_api_framework_alpha-0.3.12 → pytest_api_framework_alpha-0.3.14}/framework/startapp.py +0 -0
- {pytest_api_framework_alpha-0.3.12 → pytest_api_framework_alpha-0.3.14}/framework/utils/__init__.py +0 -0
- {pytest_api_framework_alpha-0.3.12 → pytest_api_framework_alpha-0.3.14}/framework/utils/common.py +0 -0
- {pytest_api_framework_alpha-0.3.12 → pytest_api_framework_alpha-0.3.14}/framework/utils/date_util.py +0 -0
- {pytest_api_framework_alpha-0.3.12 → pytest_api_framework_alpha-0.3.14}/framework/utils/encrypt.py +0 -0
- {pytest_api_framework_alpha-0.3.12 → pytest_api_framework_alpha-0.3.14}/framework/utils/lark_util.py +0 -0
- {pytest_api_framework_alpha-0.3.12 → pytest_api_framework_alpha-0.3.14}/framework/utils/log_util.py +0 -0
- {pytest_api_framework_alpha-0.3.12 → pytest_api_framework_alpha-0.3.14}/framework/utils/mock_util.py +0 -0
- {pytest_api_framework_alpha-0.3.12 → pytest_api_framework_alpha-0.3.14}/framework/utils/yaml_util.py +0 -0
- {pytest_api_framework_alpha-0.3.12 → pytest_api_framework_alpha-0.3.14}/framework/validate.py +0 -0
- {pytest_api_framework_alpha-0.3.12 → pytest_api_framework_alpha-0.3.14}/pytest_api_framework_alpha.egg-info/SOURCES.txt +0 -0
- {pytest_api_framework_alpha-0.3.12 → pytest_api_framework_alpha-0.3.14}/pytest_api_framework_alpha.egg-info/dependency_links.txt +0 -0
- {pytest_api_framework_alpha-0.3.12 → pytest_api_framework_alpha-0.3.14}/pytest_api_framework_alpha.egg-info/requires.txt +0 -0
- {pytest_api_framework_alpha-0.3.12 → pytest_api_framework_alpha-0.3.14}/pytest_api_framework_alpha.egg-info/top_level.txt +0 -0
- {pytest_api_framework_alpha-0.3.12 → pytest_api_framework_alpha-0.3.14}/setup.cfg +0 -0
{pytest_api_framework_alpha-0.3.12 → pytest_api_framework_alpha-0.3.14}/framework/base_class.py
RENAMED
|
@@ -162,7 +162,7 @@ class BaseTestCase(ExtendBaseTestCase):
|
|
|
162
162
|
:param new_base: 新的 base,如 'https://new.example.com'
|
|
163
163
|
:return: 替换后的 URL
|
|
164
164
|
"""
|
|
165
|
-
if url.startswith("http"):
|
|
165
|
+
if url.startswith("http") and "mce.sg" not in url:
|
|
166
166
|
return url
|
|
167
167
|
parsed_url = urlparse(url)
|
|
168
168
|
new_base_parsed = urlparse(new_base)
|
|
@@ -205,9 +205,9 @@ class BaseTestCase(ExtendBaseTestCase):
|
|
|
205
205
|
|
|
206
206
|
def regenerate_hot_wallet_for_psp(self, participant_code):
|
|
207
207
|
"""
|
|
208
|
-
|
|
208
|
+
|
|
209
209
|
:param participant_code: partner或end-user的code
|
|
210
|
-
:return:
|
|
210
|
+
:return:
|
|
211
211
|
"""
|
|
212
212
|
# 删除wallet_service中的钱包
|
|
213
213
|
self.logger.info(f"重置{participant_code}热钱包")
|
|
@@ -235,7 +235,7 @@ class BaseTestCase(ExtendBaseTestCase):
|
|
|
235
235
|
|
|
236
236
|
def regenerate_hot_wallet_for_buyer(self, partner_account, merchant_participant_code, buyer_participant_code):
|
|
237
237
|
"""
|
|
238
|
-
|
|
238
|
+
|
|
239
239
|
:param partner_account: partner账号
|
|
240
240
|
:param merchant_participant_code: merchant code
|
|
241
241
|
:param buyer_participant_code: buyer code
|
{pytest_api_framework_alpha-0.3.12 → pytest_api_framework_alpha-0.3.14}/framework/conftest.py
RENAMED
|
@@ -279,9 +279,10 @@ def pytest_generate_tests(metafunc):
|
|
|
279
279
|
|
|
280
280
|
|
|
281
281
|
def pytest_collection_modifyitems(items):
|
|
282
|
+
# 过滤掉不在收集范围的case
|
|
283
|
+
items = [item for item in items if getattr(item, "callspec", None)]
|
|
282
284
|
# 重新排序
|
|
283
285
|
new_items = sort(items)
|
|
284
|
-
# Demo: new_items = [items[0],items[2],items[1],items[3]]
|
|
285
286
|
items[:] = new_items
|
|
286
287
|
for item in items:
|
|
287
288
|
# 获取mark标记
|
|
@@ -292,6 +293,8 @@ def pytest_collection_modifyitems(items):
|
|
|
292
293
|
item.add_marker(mark)
|
|
293
294
|
|
|
294
295
|
|
|
296
|
+
|
|
297
|
+
|
|
295
298
|
def pytest_collection_finish(session):
|
|
296
299
|
"""获取最终排序后的 items 列表"""
|
|
297
300
|
logger.info(f"共收集到 {len(session.items)} 个测试用例")
|
|
@@ -800,11 +803,9 @@ def sort(case_items):
|
|
|
800
803
|
# 生成每个组当前的索引
|
|
801
804
|
ori_name_temp = None
|
|
802
805
|
ori_name_list = []
|
|
803
|
-
|
|
804
806
|
for item in non_custom_scope_items:
|
|
805
807
|
clase_id = item.cls.__name__
|
|
806
808
|
original_name = item.originalname
|
|
807
|
-
|
|
808
809
|
if ori_name_temp is None or ori_name_temp == original_name:
|
|
809
810
|
ori_name_temp = original_name
|
|
810
811
|
case_suite_num += 1
|
{pytest_api_framework_alpha-0.3.12 → pytest_api_framework_alpha-0.3.14}/framework/db/mysql_db.py
RENAMED
|
@@ -139,8 +139,14 @@ class MysqlDB:
|
|
|
139
139
|
|
|
140
140
|
@staticmethod
|
|
141
141
|
def custom_serializer(obj):
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
142
|
+
try:
|
|
143
|
+
if isinstance(obj, datetime):
|
|
144
|
+
return obj.strftime('%Y-%m-%d %H:%M:%S')
|
|
145
|
+
elif isinstance(obj, Decimal):
|
|
146
|
+
return float(obj)
|
|
147
|
+
elif isinstance(obj, bytes):
|
|
148
|
+
return obj.decode(errors='ignore', encoding='utf-8')
|
|
149
|
+
# 不处理的类型:直接返回原对象
|
|
150
|
+
return obj
|
|
151
|
+
except Exception:
|
|
152
|
+
return obj
|
{pytest_api_framework_alpha-0.3.12 → pytest_api_framework_alpha-0.3.14}/framework/__init__.py
RENAMED
|
File without changes
|
{pytest_api_framework_alpha-0.3.12 → pytest_api_framework_alpha-0.3.14}/framework/db/__init__.py
RENAMED
|
File without changes
|
{pytest_api_framework_alpha-0.3.12 → pytest_api_framework_alpha-0.3.14}/framework/db/redis_db.py
RENAMED
|
File without changes
|
{pytest_api_framework_alpha-0.3.12 → pytest_api_framework_alpha-0.3.14}/framework/exceptions.py
RENAMED
|
File without changes
|
{pytest_api_framework_alpha-0.3.12 → pytest_api_framework_alpha-0.3.14}/framework/exit_code.py
RENAMED
|
File without changes
|
{pytest_api_framework_alpha-0.3.12 → pytest_api_framework_alpha-0.3.14}/framework/extract.py
RENAMED
|
File without changes
|
|
File without changes
|
{pytest_api_framework_alpha-0.3.12 → pytest_api_framework_alpha-0.3.14}/framework/http_client.py
RENAMED
|
File without changes
|
{pytest_api_framework_alpha-0.3.12 → pytest_api_framework_alpha-0.3.14}/framework/render_data.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pytest_api_framework_alpha-0.3.12 → pytest_api_framework_alpha-0.3.14}/framework/startapp.py
RENAMED
|
File without changes
|
{pytest_api_framework_alpha-0.3.12 → pytest_api_framework_alpha-0.3.14}/framework/utils/__init__.py
RENAMED
|
File without changes
|
{pytest_api_framework_alpha-0.3.12 → pytest_api_framework_alpha-0.3.14}/framework/utils/common.py
RENAMED
|
File without changes
|
{pytest_api_framework_alpha-0.3.12 → pytest_api_framework_alpha-0.3.14}/framework/utils/date_util.py
RENAMED
|
File without changes
|
{pytest_api_framework_alpha-0.3.12 → pytest_api_framework_alpha-0.3.14}/framework/utils/encrypt.py
RENAMED
|
File without changes
|
{pytest_api_framework_alpha-0.3.12 → pytest_api_framework_alpha-0.3.14}/framework/utils/lark_util.py
RENAMED
|
File without changes
|
{pytest_api_framework_alpha-0.3.12 → pytest_api_framework_alpha-0.3.14}/framework/utils/log_util.py
RENAMED
|
File without changes
|
{pytest_api_framework_alpha-0.3.12 → pytest_api_framework_alpha-0.3.14}/framework/utils/mock_util.py
RENAMED
|
File without changes
|
{pytest_api_framework_alpha-0.3.12 → pytest_api_framework_alpha-0.3.14}/framework/utils/yaml_util.py
RENAMED
|
File without changes
|
{pytest_api_framework_alpha-0.3.12 → pytest_api_framework_alpha-0.3.14}/framework/validate.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|