qapytest 0.2.0__tar.gz → 0.2.1__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.
- {qapytest-0.2.0 → qapytest-0.2.1}/PKG-INFO +1 -1
- {qapytest-0.2.0 → qapytest-0.2.1}/pyproject.toml +1 -1
- {qapytest-0.2.0 → qapytest-0.2.1}/qapytest/_config_http.py +5 -2
- {qapytest-0.2.0 → qapytest-0.2.1}/uv.lock +1 -1
- {qapytest-0.2.0 → qapytest-0.2.1}/.gitignore +0 -0
- {qapytest-0.2.0 → qapytest-0.2.1}/.pre-commit-config.yaml +0 -0
- {qapytest-0.2.0 → qapytest-0.2.1}/CHANGELOG.md +0 -0
- {qapytest-0.2.0 → qapytest-0.2.1}/LICENSE +0 -0
- {qapytest-0.2.0 → qapytest-0.2.1}/README.md +0 -0
- {qapytest-0.2.0 → qapytest-0.2.1}/THIRD_PARTY_NOTICES.txt +0 -0
- {qapytest-0.2.0 → qapytest-0.2.1}/demo.py +0 -0
- {qapytest-0.2.0 → qapytest-0.2.1}/docs/API.md +0 -0
- {qapytest-0.2.0 → qapytest-0.2.1}/docs/CLI.md +0 -0
- {qapytest-0.2.0 → qapytest-0.2.1}/licenses/httpx.LICENSE +0 -0
- {qapytest-0.2.0 → qapytest-0.2.1}/licenses/jinja2.LICENSE +0 -0
- {qapytest-0.2.0 → qapytest-0.2.1}/licenses/jsonschema.LICENSE +0 -0
- {qapytest-0.2.0 → qapytest-0.2.1}/licenses/pytest.LICENSE +0 -0
- {qapytest-0.2.0 → qapytest-0.2.1}/licenses/python_dotenv.LICENSE +0 -0
- {qapytest-0.2.0 → qapytest-0.2.1}/licenses/redis-py.LICENSE +0 -0
- {qapytest-0.2.0 → qapytest-0.2.1}/licenses/sqlalchemy.LICENSE +0 -0
- {qapytest-0.2.0 → qapytest-0.2.1}/qapytest/__init__.py +0 -0
- {qapytest-0.2.0 → qapytest-0.2.1}/qapytest/_assets/_log_tree.html.jinja2 +0 -0
- {qapytest-0.2.0 → qapytest-0.2.1}/qapytest/_assets/report.html.jinja2 +0 -0
- {qapytest-0.2.0 → qapytest-0.2.1}/qapytest/_assets/scripts.js +0 -0
- {qapytest-0.2.0 → qapytest-0.2.1}/qapytest/_assets/styles.css +0 -0
- {qapytest-0.2.0 → qapytest-0.2.1}/qapytest/_attach.py +0 -0
- {qapytest-0.2.0 → qapytest-0.2.1}/qapytest/_client_http.py +0 -0
- {qapytest-0.2.0 → qapytest-0.2.1}/qapytest/_config.py +0 -0
- {qapytest-0.2.0 → qapytest-0.2.1}/qapytest/_internal.py +0 -0
- {qapytest-0.2.0 → qapytest-0.2.1}/qapytest/_json_validation.py +0 -0
- {qapytest-0.2.0 → qapytest-0.2.1}/qapytest/_plugin.py +0 -0
- {qapytest-0.2.0 → qapytest-0.2.1}/qapytest/_redis.py +0 -0
- {qapytest-0.2.0 → qapytest-0.2.1}/qapytest/_report.py +0 -0
- {qapytest-0.2.0 → qapytest-0.2.1}/qapytest/_soft_assert.py +0 -0
- {qapytest-0.2.0 → qapytest-0.2.1}/qapytest/_sql.py +0 -0
- {qapytest-0.2.0 → qapytest-0.2.1}/qapytest/_step.py +0 -0
- {qapytest-0.2.0 → qapytest-0.2.1}/qapytest/py.typed +0 -0
- {qapytest-0.2.0 → qapytest-0.2.1}/tests/test_attach.py +0 -0
- {qapytest-0.2.0 → qapytest-0.2.1}/tests/test_graphql_client.py +0 -0
- {qapytest-0.2.0 → qapytest-0.2.1}/tests/test_http_client.py +0 -0
- {qapytest-0.2.0 → qapytest-0.2.1}/tests/test_integration.py +0 -0
- {qapytest-0.2.0 → qapytest-0.2.1}/tests/test_internal_functions.py +0 -0
- {qapytest-0.2.0 → qapytest-0.2.1}/tests/test_markers.py +0 -0
- {qapytest-0.2.0 → qapytest-0.2.1}/tests/test_redis_client.py +0 -0
- {qapytest-0.2.0 → qapytest-0.2.1}/tests/test_soft_assert.py +0 -0
- {qapytest-0.2.0 → qapytest-0.2.1}/tests/test_sql_client.py +0 -0
- {qapytest-0.2.0 → qapytest-0.2.1}/tests/test_step.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: qapytest
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.1
|
|
4
4
|
Summary: A powerful testing framework based on pytest, specifically designed for QA engineers
|
|
5
5
|
Project-URL: Homepage, https://github.com/o73k51i/qapytest
|
|
6
6
|
Project-URL: Repository, https://github.com/o73k51i/qapytest
|
|
@@ -23,6 +23,7 @@ class BaseHttpClient(Client):
|
|
|
23
23
|
sensitive_text_patterns: list[str] | None = None,
|
|
24
24
|
mask_sensitive_data: bool = True,
|
|
25
25
|
name_logger: str = "HttpClient",
|
|
26
|
+
enable_log: bool = True,
|
|
26
27
|
**kwargs,
|
|
27
28
|
) -> None:
|
|
28
29
|
"""Constructor for BaseHttpClient."""
|
|
@@ -31,6 +32,7 @@ class BaseHttpClient(Client):
|
|
|
31
32
|
logging.getLogger(name).setLevel(logging.WARNING)
|
|
32
33
|
self._logger = logging.getLogger(name_logger)
|
|
33
34
|
self._mask_sensitive_data = mask_sensitive_data
|
|
35
|
+
self.enable_log = enable_log
|
|
34
36
|
|
|
35
37
|
# Default sensitive headers
|
|
36
38
|
default_sensitive_headers = {
|
|
@@ -247,6 +249,7 @@ class BaseHttpClient(Client):
|
|
|
247
249
|
def request(self, *args, **kwargs) -> Response:
|
|
248
250
|
"""Root method to perform HTTP requests with logging."""
|
|
249
251
|
response = super().request(*args, **kwargs)
|
|
250
|
-
self.
|
|
251
|
-
|
|
252
|
+
if self.enable_log:
|
|
253
|
+
self._log_request(response)
|
|
254
|
+
self._log_response(response)
|
|
252
255
|
return response
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|