holado 0.3.0__py3-none-any.whl → 0.4.1__py3-none-any.whl
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.
Potentially problematic release.
This version of holado might be problematic. Click here for more details.
- {holado-0.3.0.dist-info → holado-0.4.1.dist-info}/METADATA +1 -1
- {holado-0.3.0.dist-info → holado-0.4.1.dist-info}/RECORD +14 -14
- holado_logging/common/logging/log_config.py +4 -3
- holado_python/standard_library/ssl/resources/certificates/tcpbin.crt +16 -16
- holado_python/standard_library/ssl/resources/certificates/tcpbin.key +26 -26
- holado_python/standard_library/ssl/ssl.py +5 -1
- holado_python/tests/behave/steps/standard_library/hashlib_steps.py +1 -1
- holado_rest/api/rest/rest_client.py +24 -5
- holado_rest/api/rest/rest_manager.py +5 -0
- holado_rest/tests/behave/steps/api/rest_client_steps.py +51 -10
- holado_swagger/swagger_hub/mockserver/mockserver_client.py +1 -1
- test_holado/logging.conf +1 -0
- {holado-0.3.0.dist-info → holado-0.4.1.dist-info}/WHEEL +0 -0
- {holado-0.3.0.dist-info → holado-0.4.1.dist-info}/licenses/LICENSE +0 -0
|
@@ -219,7 +219,7 @@ holado_keycloak/tools/keycloak/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5
|
|
|
219
219
|
holado_keycloak/tools/keycloak/keycloak_client.py,sha256=QXAsf9rF0pKq1dHhXeZFZOxuEg_1uzp6vqXnwWDnegg,4019
|
|
220
220
|
holado_logging/__init__.py,sha256=EMmwm_jHe739gftVCmf6lb_dT20IVseVg0bbGGADn8w,2176
|
|
221
221
|
holado_logging/common/logging/holado_logger.py,sha256=vlU_q5jYD9Qf-xWFBogeNiIR9qpRri-68OfMofgbhy4,3320
|
|
222
|
-
holado_logging/common/logging/log_config.py,sha256=
|
|
222
|
+
holado_logging/common/logging/log_config.py,sha256=DdYEW-2YSZ6QZDZCeVn_IZOKQlwWvqi2NWEbPhvExxw,6578
|
|
223
223
|
holado_logging/common/logging/log_manager.py,sha256=gq92IAfnKEX-GKUHexNVgEI0UUrUdiWaC5GLcSTAaUE,13604
|
|
224
224
|
holado_multitask/__init__.py,sha256=EwuwiBmp8ICbPZ8CKPju8tHRTh2rG68PB_wGXczY9rw,2143
|
|
225
225
|
holado_multitask/multiprocessing/function_process.py,sha256=HFXjpnzWed5J1tjmWMQyRx8AGcY6D1laegHqZ5j1dco,4550
|
|
@@ -276,20 +276,20 @@ holado_python/standard_library/socket/echo_server.py,sha256=ntApbwcckiEEBw-qjE48
|
|
|
276
276
|
holado_python/standard_library/socket/message_socket.py,sha256=r9cAs-HWGE0t1Dn09RA-HJ5pBExEjBwN_y9F-JYxno8,5638
|
|
277
277
|
holado_python/standard_library/socket/non_blocking_socket.py,sha256=FGJHbSTTe5KgCBXva9YrU8Fxn7fGbckQy9jsBNtbQiI,7164
|
|
278
278
|
holado_python/standard_library/socket/socket.py,sha256=K2EURF_C8FttqOy7bfiMkVR74W8y3yH5Wbg_wXhzzyM,15781
|
|
279
|
-
holado_python/standard_library/ssl/ssl.py,sha256=
|
|
279
|
+
holado_python/standard_library/ssl/ssl.py,sha256=S0t9uBy6t6MWGUXgvZk3APmjhNom74qaOHbFyfznY0Y,10987
|
|
280
280
|
holado_python/standard_library/ssl/resources/certificates/NOTES.txt,sha256=GlPGGZT_lqV2fNeh-JKQZDC7xJOa3fLTYuwnC_-UYNg,384
|
|
281
281
|
holado_python/standard_library/ssl/resources/certificates/localhost.crt,sha256=iLmZpDuOQVawUlbZkb72g2-uv1c4SAmRJOrm4Th5anY,1123
|
|
282
282
|
holado_python/standard_library/ssl/resources/certificates/localhost.key,sha256=lP2NCvB9mr2E5sk8whA8FyQRcyU6H7sdWkJeKz80Hyc,1704
|
|
283
283
|
holado_python/standard_library/ssl/resources/certificates/rootCACert.pem,sha256=ECQDZ8OHRfqpZHCu6JRLMUjiONaPIhKZQF0-kidVrWQ,1424
|
|
284
|
-
holado_python/standard_library/ssl/resources/certificates/tcpbin.crt,sha256=
|
|
285
|
-
holado_python/standard_library/ssl/resources/certificates/tcpbin.key,sha256=
|
|
284
|
+
holado_python/standard_library/ssl/resources/certificates/tcpbin.crt,sha256=dKBWzPBWggkaJcsa3gtVuwIuGpQ9sijHfoQa_Xo0kUY,1237
|
|
285
|
+
holado_python/standard_library/ssl/resources/certificates/tcpbin.key,sha256=gm9RKRgXKofFe3Mvk_zykYH6Q6tmyLM6-vA5D7_Pm-U,1704
|
|
286
286
|
holado_python/tests/behave/steps/__init__.py,sha256=TWEk-kBTTDHi9I4nuu48nufmNMdZ9FHAhPZv0A_cWzc,1661
|
|
287
287
|
holado_python/tests/behave/steps/convert_steps.py,sha256=bZqRvJVp_u6fSPpdu4ne9NwVyZmui7R-AVdO2-H-I1A,2728
|
|
288
288
|
holado_python/tests/behave/steps/iterable_steps.py,sha256=f4vGIWBH8Qnjq69Q-ZBluYyctQ8SKauazTc41dsktZA,4041
|
|
289
289
|
holado_python/tests/behave/steps/builtins/str_steps.py,sha256=ugNIz5v5EpkiRBDmwDl2JtAq5RWXu6UnLv7HH73WiXw,2101
|
|
290
290
|
holado_python/tests/behave/steps/standard_library/csv_steps.py,sha256=VJ5wmr0CQ8voBSgnXQUBAdYkEGFOCs95JKcV52tVMOo,7460
|
|
291
291
|
holado_python/tests/behave/steps/standard_library/datetime_steps.py,sha256=mWbYb-CjSVKKWNcBaBzL24jP86C0v-NZ8W3hfrzHlbc,7815
|
|
292
|
-
holado_python/tests/behave/steps/standard_library/hashlib_steps.py,sha256=
|
|
292
|
+
holado_python/tests/behave/steps/standard_library/hashlib_steps.py,sha256=j1NmcvFAFKYAhWeYWc6Xf32M0CPGTgk2fHcaBBbav8o,2978
|
|
293
293
|
holado_python/tests/behave/steps/standard_library/multiprocessing_steps.py,sha256=DD--5bxCvFTXY6KBqKzKAuOrOK0aZdPjbRR5SO0PZBo,2519
|
|
294
294
|
holado_python/tests/behave/steps/standard_library/queue_steps.py,sha256=GdHKKIka5tzFxVTBYPJNywyVLDtggZF2RB_mFIbyLdI,17429
|
|
295
295
|
holado_python/tests/behave/steps/standard_library/socket_steps.py,sha256=IkZ88bR9QK3ji3JhnfKbEBWL1lDje2bzKv1iCaXUg4A,17742
|
|
@@ -326,11 +326,11 @@ holado_report/report/reports/feature_report.py,sha256=i0wpk3LQLArVjWDsP9UcNSJzAU
|
|
|
326
326
|
holado_report/report/reports/scenario_report.py,sha256=eMyqw9EzaKMmX3pGFJN1rqAOQ5eqO2ISZdxAfK3XQR4,2945
|
|
327
327
|
holado_rest/__init__.py,sha256=BOeE6t6ejeqRYd44SE4vYJVTNz01BwcVCIWfwRQ5axg,1526
|
|
328
328
|
holado_rest/api/rest/TODO.txt,sha256=2hhmTDatpplFhgv8fkBPM4WOa6pow-978-0pmN51cU0,59
|
|
329
|
-
holado_rest/api/rest/rest_client.py,sha256=
|
|
330
|
-
holado_rest/api/rest/rest_manager.py,sha256=
|
|
329
|
+
holado_rest/api/rest/rest_client.py,sha256=a6CNXBEkuCF3MJnXRVhvBrVKBRqtV4NFohFsdFaInUc,5729
|
|
330
|
+
holado_rest/api/rest/rest_manager.py,sha256=nekokAwN73n7Dn3nLhwf22XaKDW1sYjy4-JLWdfGxBQ,3559
|
|
331
331
|
holado_rest/tests/behave/steps/__init__.py,sha256=lEH5NYkKtpgDV2ZAO1qAGNN4ipwILWMpgvQgnamgYKk,1283
|
|
332
332
|
holado_rest/tests/behave/steps/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
333
|
-
holado_rest/tests/behave/steps/api/rest_client_steps.py,sha256
|
|
333
|
+
holado_rest/tests/behave/steps/api/rest_client_steps.py,sha256=-msAniL0tBxhwPGIIWMryxuvVCfzQS_B2TngIdluVZg,9793
|
|
334
334
|
holado_rest/tests/behave/steps/private/__init__.py,sha256=TGsd7qLZpPQRxphFzgepFa22NhHSoZgxAWSIqwvA4L8,1276
|
|
335
335
|
holado_rest/tests/behave/steps/private/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
336
336
|
holado_rest/tests/behave/steps/private/api/rest_steps.py,sha256=Sca0EM6uuzG-Zk976vz-EKvbwViha2vABAOpkXp9gTg,3360
|
|
@@ -388,7 +388,7 @@ holado_sftp/tools/sftp/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3
|
|
|
388
388
|
holado_sftp/tools/sftp/sftp_client.py,sha256=ExpIQoImZt9KpHuGLuZmxZetvuzK426-DQ67pDPenOM,4486
|
|
389
389
|
holado_sftp/tools/sftp/sftp_server.py,sha256=N_Ym3Rm8w_QS6E0id543LZXfQ7G38DeKjVwCRH2irKA,1969
|
|
390
390
|
holado_swagger/__init__.py,sha256=VSOq3mr1SaTEnceP_4kwYBYAMTuyVE9_61wOdKKasis,1664
|
|
391
|
-
holado_swagger/swagger_hub/mockserver/mockserver_client.py,sha256=
|
|
391
|
+
holado_swagger/swagger_hub/mockserver/mockserver_client.py,sha256=L7P8aNi5Zuh2xRURbTLkMKeS3XcMENdgvb5BbOb3La0,4067
|
|
392
392
|
holado_swagger/swagger_hub/mockserver/mockserver_manager.py,sha256=5ubBMgtNNaoXcgDjPNM0BcJ0N_QaE_hvmy4i05Pq53w,1646
|
|
393
393
|
holado_swagger/tests/behave/steps/__init__.py,sha256=joCT_nKaotXBBMNTXxOBcmr98gjmjDkY1Zbu5lCL8B4,1290
|
|
394
394
|
holado_swagger/tests/behave/steps/swagger_hub/mockserver_steps.py,sha256=_M5WyF35qBjvDnXbohhMA9kV3D1H1aRnTBQ1iOtmxHA,3749
|
|
@@ -451,7 +451,7 @@ test_holado/__init__.py,sha256=TIHAHrF05rvz6-VDKuDBSBjasD6PxTxXvcXjMEC3D6E,54
|
|
|
451
451
|
test_holado/__main__.py,sha256=PVdCX8V_RGRzbQQKVxf7eyt8a10XfUJ1pcaajGgIlus,1509
|
|
452
452
|
test_holado/build_docker_image_to_test_holado_in_docker.sh,sha256=B3hbi0yKnEC-t9S18o6ZR27AU1bqiuptwOqm6H7tv8s,142
|
|
453
453
|
test_holado/environment.py,sha256=X4a6q9Km_Ya8XFIjwlDULgEQOkucumXxjIrIRtK1GDY,2294
|
|
454
|
-
test_holado/logging.conf,sha256=
|
|
454
|
+
test_holado/logging.conf,sha256=lPN0DwMK18nVcnVolVS32cFLHhv6NkWLo6fQW0BRDnk,1202
|
|
455
455
|
test_holado/test_holado_session_context.py,sha256=qOB_i2k8mYjkR3-q2uv0B04xFc1K3p-K20ttYwe1Z18,1364
|
|
456
456
|
test_holado/features/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
457
457
|
test_holado/features/NonReg/api/REST.feature,sha256=ouaDdgXulNlXcZ7fSrSGCX-qDmQoCpXWnR_hKcKh8M4,469
|
|
@@ -539,7 +539,7 @@ test_holado/tools/django/api_rest/api_rest/api1/serializers.py,sha256=o_YxFr-tgC
|
|
|
539
539
|
test_holado/tools/django/api_rest/api_rest/api1/tests.py,sha256=mrbGGRNg5jwbTJtWWa7zSKdDyeB4vmgZCRc2nk6VY-g,60
|
|
540
540
|
test_holado/tools/django/api_rest/api_rest/api1/views.py,sha256=kOt2xT6bxO47_z__5yYR9kcYIWWv4qYzpX0K8Tqonik,758
|
|
541
541
|
test_holado/tools/django/api_rest/api_rest/api1/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
542
|
-
holado-0.
|
|
543
|
-
holado-0.
|
|
544
|
-
holado-0.
|
|
545
|
-
holado-0.
|
|
542
|
+
holado-0.4.1.dist-info/METADATA,sha256=LkyjyCuo6hjHK4mtZwHiTHiz0P0L0YFAiwepTDC7dQg,6043
|
|
543
|
+
holado-0.4.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
544
|
+
holado-0.4.1.dist-info/licenses/LICENSE,sha256=IgGmNlcFHnbp7UWrLJqAFvs_HIgjJDTmjCNRircJLsk,1070
|
|
545
|
+
holado-0.4.1.dist-info/RECORD,,
|
|
@@ -32,6 +32,10 @@ class LogConfig(object):
|
|
|
32
32
|
logging.warning(f"Logging was already configured, it is not possible to configure it twice. This new configuration is skipped.")
|
|
33
33
|
return
|
|
34
34
|
|
|
35
|
+
# Use holado loggers
|
|
36
|
+
if use_holado_logger:
|
|
37
|
+
cls.__set_holado_loggers()
|
|
38
|
+
|
|
35
39
|
# HolAdo needs at least to add logging level TRACE and PRINT
|
|
36
40
|
cls.add_logging_level_trace()
|
|
37
41
|
cls.add_logging_level_print()
|
|
@@ -58,9 +62,6 @@ class LogConfig(object):
|
|
|
58
62
|
log_in_file = True if log_in_file == "True" else False
|
|
59
63
|
cls.log_in_file = log_in_file
|
|
60
64
|
|
|
61
|
-
if use_holado_logger:
|
|
62
|
-
cls.__set_holado_loggers()
|
|
63
|
-
|
|
64
65
|
cls.__is_configured = True
|
|
65
66
|
|
|
66
67
|
@classmethod
|
|
@@ -2,20 +2,20 @@
|
|
|
2
2
|
MIIDZTCCAk2gAwIBAgIBKjANBgkqhkiG9w0BAQsFADCBizELMAkGA1UEBhMCVVMx
|
|
3
3
|
CzAJBgNVBAgMAkNBMRYwFAYDVQQHDA1TYW4gRnJhbmNpc2NvMQ8wDQYDVQQKDAZ0
|
|
4
4
|
Y3BiaW4xDDAKBgNVBAsMA29wczETMBEGA1UEAwwKdGNwYmluLmNvbTEjMCEGCSqG
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
FOLuMowBSAZfV5v82LmlaIIOvU/
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
5
|
+
SIb3DQEJARYUaGFycnliYWdkaUBnbWFpbC5jb20wHhcNMjUwNjI2MTY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X1x7sUYjN61Dd2AwoOanI8phDsp2R4/
|
|
26
|
+
7ywBy2es5ePrk5Ma332QA/6rxkLVXGaGEV4mCVziF4PEGsbMZzx7YDIZoXUwuKw0
|
|
27
|
+
JLVTXQhAmlEnNoMi1T/zLB8=
|
|
28
28
|
-----END PRIVATE KEY-----
|
|
@@ -90,7 +90,11 @@ class SslManager(object):
|
|
|
90
90
|
f"Note: step 'Given CACERTS_PATH = CA certs file path (from certifi package)' can be used to get the path to CA file coming with 'certifi' package that is supposed to be installed when using ssl module",
|
|
91
91
|
]
|
|
92
92
|
raise TechnicalException("\n".join(msg_list))
|
|
93
|
-
|
|
93
|
+
try:
|
|
94
|
+
logger.debug(f"Loaded CA certificates: {res.get_ca_certs()})")
|
|
95
|
+
except NotImplementedError:
|
|
96
|
+
# Depending on environment, get_ca_certs can be not implemented (ex: python 3.10 and pip v25.1.1)
|
|
97
|
+
pass
|
|
94
98
|
logger.debug(f"Loaded ciphers: {res.get_ciphers()})")
|
|
95
99
|
|
|
96
100
|
except Exception as exc:
|
|
@@ -40,7 +40,7 @@ def __get_variable_manager():
|
|
|
40
40
|
def step_impl(context, var_name, code_size, content, prefix):
|
|
41
41
|
"""Return a code computed with content as input.
|
|
42
42
|
Dynamic part of the code is computed with blake2b hash algorithm.
|
|
43
|
-
If code_size (minus length of prefix if defined) is not a multiple of 2, it is rounded to the multiple of 2
|
|
43
|
+
If code_size (minus length of prefix if defined) is not a multiple of 2, it is rounded to the multiple of 2 just below.
|
|
44
44
|
"""
|
|
45
45
|
var_name = StepTools.evaluate_variable_name(var_name)
|
|
46
46
|
code_size = StepTools.evaluate_scenario_parameter(code_size)
|
|
@@ -15,6 +15,7 @@ from holado_core.common.exceptions.functional_exception import FunctionalExcepti
|
|
|
15
15
|
from holado_core.common.exceptions.technical_exception import TechnicalException
|
|
16
16
|
import logging
|
|
17
17
|
from holado_core.common.tools.tools import Tools
|
|
18
|
+
import json
|
|
18
19
|
|
|
19
20
|
logger = logging.getLogger(__name__)
|
|
20
21
|
|
|
@@ -56,15 +57,26 @@ class RestClient(object):
|
|
|
56
57
|
if Tools.do_log(logger, logging.DEBUG):
|
|
57
58
|
logger.debug(f"[{self.name}] Authenticate with token type '{token_type}' and access token '{access_token}'")
|
|
58
59
|
self.__headers['Authorization'] = f'{token_type} {access_token}'
|
|
60
|
+
|
|
61
|
+
def with_ssl(self, ssl_kwargs):
|
|
62
|
+
unexpected_keys = set(ssl_kwargs.keys()).difference(['verify', 'cert'])
|
|
63
|
+
if len(unexpected_keys) > 0:
|
|
64
|
+
raise TechnicalException(f"Unmanaged SSL arguments: {unexpected_keys}")
|
|
59
65
|
|
|
60
|
-
|
|
61
|
-
if response.status_code != status_ok:
|
|
62
|
-
raise FunctionalException(f"[{self.name}] Request failed with status {response.status_code} (expected success status: {status_ok}")
|
|
66
|
+
self.__kwargs.update(ssl_kwargs)
|
|
63
67
|
|
|
68
|
+
def response_result(self, response, status_ok=200):
|
|
64
69
|
if "application/json" in response.headers['Content-Type']:
|
|
65
|
-
|
|
70
|
+
res = response.json()
|
|
71
|
+
elif response.headers['Content-Type'].startswith('text'):
|
|
72
|
+
res = response.text
|
|
66
73
|
else:
|
|
67
|
-
|
|
74
|
+
res = response.content
|
|
75
|
+
|
|
76
|
+
if response.status_code != status_ok:
|
|
77
|
+
raise FunctionalException(f"[{self.name}] Request failed with status {response.status_code} (expected success status: {status_ok}) on error: {res}")
|
|
78
|
+
|
|
79
|
+
return res
|
|
68
80
|
|
|
69
81
|
def request(self, method, path, **kwargs):
|
|
70
82
|
url = self.__build_url(path=path)
|
|
@@ -104,6 +116,13 @@ class RestClient(object):
|
|
|
104
116
|
if self.__headers:
|
|
105
117
|
res['headers'] = self.__headers
|
|
106
118
|
if request_kwargs:
|
|
119
|
+
# Ensure data is in json string format
|
|
120
|
+
if 'data' in request_kwargs:
|
|
121
|
+
data = request_kwargs.pop('data')
|
|
122
|
+
if data is not None and not isinstance(data, str):
|
|
123
|
+
data = json.dumps(data)
|
|
124
|
+
res['data'] = data
|
|
125
|
+
|
|
107
126
|
for key in list(request_kwargs.keys()):
|
|
108
127
|
if key in res and isinstance(res[key], dict):
|
|
109
128
|
res[key].update(request_kwargs.pop(key))
|
|
@@ -33,6 +33,7 @@ class RestManager(object):
|
|
|
33
33
|
url = kwargs.pop("url")
|
|
34
34
|
headers = Tools.pop_sub_kwargs(kwargs, "headers.")
|
|
35
35
|
authentication = Tools.pop_sub_kwargs(kwargs, "authentication.")
|
|
36
|
+
ssl_kwargs = Tools.pop_sub_kwargs(kwargs, "ssl.")
|
|
36
37
|
if len(kwargs) > 0:
|
|
37
38
|
raise TechnicalException(f"Unmanaged arguments: {kwargs}")
|
|
38
39
|
|
|
@@ -53,6 +54,10 @@ class RestManager(object):
|
|
|
53
54
|
else:
|
|
54
55
|
raise TechnicalException(f"Unmanaged authentication type '{authentication.keys()}' (possible authentication types: 'user', 'token'")
|
|
55
56
|
|
|
57
|
+
# Manage ssl if needed
|
|
58
|
+
if len(ssl_kwargs) > 0:
|
|
59
|
+
res.with_ssl(ssl_kwargs)
|
|
60
|
+
|
|
56
61
|
return res
|
|
57
62
|
|
|
58
63
|
def _new_rest_client(self, name, url, headers):
|
|
@@ -63,21 +63,62 @@ if RestClient.is_available():
|
|
|
63
63
|
var_name = StepTools.evaluate_variable_name(var_name)
|
|
64
64
|
path = StepTools.evaluate_scenario_parameter(path)
|
|
65
65
|
client = StepTools.evaluate_variable_value(var_client)
|
|
66
|
+
|
|
67
|
+
# Manage request arguments as step table
|
|
68
|
+
request_kwargs = {}
|
|
69
|
+
if hasattr(context, "table") and context.table is not None:
|
|
70
|
+
table = BehaveStepTools.convert_step_table_2_value_table_with_header(context.table)
|
|
71
|
+
request_kwargs = ValueTableConverter.convert_name_value_table_2_json_object(table)
|
|
72
|
+
|
|
73
|
+
# Manage request arguments as json text
|
|
74
|
+
# Manage data as json text
|
|
75
|
+
text = BehaveStepTools.get_step_multiline_text(context, raise_exception_if_none=False)
|
|
76
|
+
if text is not None:
|
|
77
|
+
if len(request_kwargs) > 0:
|
|
78
|
+
raise TechnicalException(f"Request kwargs are already set to {request_kwargs}")
|
|
79
|
+
request_kwargs = json.loads(text)
|
|
80
|
+
|
|
81
|
+
# Process request
|
|
82
|
+
res = client.request(request_method, path, **request_kwargs)
|
|
83
|
+
|
|
84
|
+
# Store result
|
|
85
|
+
if Tools.do_log(logger, logging.DEBUG):
|
|
86
|
+
res_table = TableManager.convert_object_attributes_2_name_value_table(res)
|
|
87
|
+
logger.debug(f"Response of {request_method} {path}:\n{res_table.represent(4)}")
|
|
88
|
+
__get_variable_manager().register_variable(var_name, res)
|
|
89
|
+
|
|
90
|
+
@Step(r"(?P<var_name>{Variable}) = (?P<request_method>delete|get|patch|post|put) (?P<path>{Str}) \(REST client: (?P<var_client>{Variable})\)")
|
|
91
|
+
def step_impl(context, var_name, request_method, path, var_client):
|
|
92
|
+
var_name = StepTools.evaluate_variable_name(var_name)
|
|
93
|
+
client = StepTools.evaluate_variable_value(var_client)
|
|
66
94
|
|
|
67
|
-
|
|
95
|
+
execute_steps(format_step_with_context(context,
|
|
96
|
+
u"__RESPONSE__@ = response of {request_method} {path} (REST client: {var_client})"
|
|
97
|
+
.format(request_method=request_method, path=path, var_client=var_client) ))
|
|
98
|
+
|
|
99
|
+
response = __get_variable_manager().get_variable_value("__RESPONSE__@")
|
|
100
|
+
res = client.response_result(response)
|
|
101
|
+
|
|
102
|
+
__get_variable_manager().register_variable(var_name, res)
|
|
103
|
+
|
|
104
|
+
@Step(r"(?P<var_name>{Variable}) = response of (?P<request_method>delete|get|patch|post|put) (?P<path>{Str}) with data \(REST client: (?P<var_client>{Variable})\)")
|
|
105
|
+
def step_impl(context, var_name, request_method, path, var_client):
|
|
106
|
+
var_name = StepTools.evaluate_variable_name(var_name)
|
|
107
|
+
path = StepTools.evaluate_scenario_parameter(path)
|
|
108
|
+
client = StepTools.evaluate_variable_value(var_client)
|
|
109
|
+
|
|
68
110
|
data = None
|
|
111
|
+
|
|
112
|
+
# Manage request arguments as step table
|
|
69
113
|
if hasattr(context, "table") and context.table is not None:
|
|
70
114
|
table = BehaveStepTools.convert_step_table_2_value_table_with_header(context.table)
|
|
71
|
-
|
|
72
|
-
data = json.dumps(
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
115
|
+
json_obj = ValueTableConverter.convert_name_value_table_2_json_object(table)
|
|
116
|
+
data = json.dumps(json_obj)
|
|
117
|
+
|
|
118
|
+
# Manage request arguments as json text
|
|
76
119
|
# Manage data as json text
|
|
77
120
|
text = BehaveStepTools.get_step_multiline_text(context, raise_exception_if_none=False)
|
|
78
121
|
if text is not None:
|
|
79
|
-
if request_method in ['delete', 'get']:
|
|
80
|
-
raise TechnicalException(f"Unexpected json text for request method '{request_method}'")
|
|
81
122
|
if data is not None:
|
|
82
123
|
raise TechnicalException(f"Data is already set to [{data}]")
|
|
83
124
|
data = text
|
|
@@ -91,13 +132,13 @@ if RestClient.is_available():
|
|
|
91
132
|
logger.debug(f"Response of {request_method} {path}:\n{res_table.represent(4)}")
|
|
92
133
|
__get_variable_manager().register_variable(var_name, res)
|
|
93
134
|
|
|
94
|
-
@
|
|
135
|
+
@Step(r"(?P<var_name>{Variable}) = (?P<request_method>delete|get|patch|post|put) (?P<path>{Str}) with data \(REST client: (?P<var_client>{Variable})\)")
|
|
95
136
|
def step_impl(context, var_name, request_method, path, var_client):
|
|
96
137
|
var_name = StepTools.evaluate_variable_name(var_name)
|
|
97
138
|
client = StepTools.evaluate_variable_value(var_client)
|
|
98
139
|
|
|
99
140
|
execute_steps(format_step_with_context(context,
|
|
100
|
-
u"__RESPONSE__@ = response of {request_method} {path} (REST client: {var_client})"
|
|
141
|
+
u"__RESPONSE__@ = response of {request_method} {path} with data (REST client: {var_client})"
|
|
101
142
|
.format(request_method=request_method, path=path, var_client=var_client) ))
|
|
102
143
|
|
|
103
144
|
response = __get_variable_manager().get_variable_value("__RESPONSE__@")
|
|
@@ -45,7 +45,7 @@ class MockServerClient(RestClient):
|
|
|
45
45
|
params['format'] = format_
|
|
46
46
|
|
|
47
47
|
result = self.put('/mockserver/retrieve', params=params)
|
|
48
|
-
res =
|
|
48
|
+
res = self.response_result(result)
|
|
49
49
|
|
|
50
50
|
if since_datetime is not None:
|
|
51
51
|
if not isinstance(since_datetime, datetime.datetime):
|
test_holado/logging.conf
CHANGED
|
@@ -22,6 +22,7 @@ holado_multitask=WARNING
|
|
|
22
22
|
#holado_protobuf.ipc.protobuf=DEBUG
|
|
23
23
|
#holado_protobuf.ipc.protobuf.protobuf_messages=TRACE
|
|
24
24
|
#holado_python.standard_library.socket=DEBUG
|
|
25
|
+
#holado_rest.api/rest=DEBUG
|
|
25
26
|
#holado_value.common.tables.value_table_cell=TRACE
|
|
26
27
|
holado_s3.tools.s3.minio_client.trace=INFO
|
|
27
28
|
|
|
File without changes
|
|
File without changes
|