sefrone-api-e2e 1.2.3__tar.gz → 1.2.4__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.
- {sefrone_api_e2e-1.2.3 → sefrone_api_e2e-1.2.4}/PKG-INFO +1 -1
- {sefrone_api_e2e-1.2.3 → sefrone_api_e2e-1.2.4}/sefrone_api_e2e/runner_rest_api.py +18 -1
- {sefrone_api_e2e-1.2.3 → sefrone_api_e2e-1.2.4}/sefrone_api_e2e.egg-info/PKG-INFO +1 -1
- {sefrone_api_e2e-1.2.3 → sefrone_api_e2e-1.2.4}/setup.py +1 -1
- {sefrone_api_e2e-1.2.3 → sefrone_api_e2e-1.2.4}/README.md +0 -0
- {sefrone_api_e2e-1.2.3 → sefrone_api_e2e-1.2.4}/sefrone_api_e2e/__init__.py +0 -0
- {sefrone_api_e2e-1.2.3 → sefrone_api_e2e-1.2.4}/sefrone_api_e2e/api_e2e_manager.py +0 -0
- {sefrone_api_e2e-1.2.3 → sefrone_api_e2e-1.2.4}/sefrone_api_e2e/e2e/Scenarios/Auth/0_check_features.yaml +0 -0
- {sefrone_api_e2e-1.2.3 → sefrone_api_e2e-1.2.4}/sefrone_api_e2e/e2e/Scenarios/Auth/1_normal_auth_flow.yaml +0 -0
- {sefrone_api_e2e-1.2.3 → sefrone_api_e2e-1.2.4}/sefrone_api_e2e/e2e/Scenarios/Auth/2_account_endpoints.yaml +0 -0
- {sefrone_api_e2e-1.2.3 → sefrone_api_e2e-1.2.4}/sefrone_api_e2e/e2e/Scenarios/Auth/3_admin_account_endpoints.yaml +0 -0
- {sefrone_api_e2e-1.2.3 → sefrone_api_e2e-1.2.4}/sefrone_api_e2e/e2e/Scenarios/Auth/4_workspace_endpoints.yaml +0 -0
- {sefrone_api_e2e-1.2.3 → sefrone_api_e2e-1.2.4}/sefrone_api_e2e/e2e/Scenarios/Auth/5_apikey_endpoints.yaml +0 -0
- {sefrone_api_e2e-1.2.3 → sefrone_api_e2e-1.2.4}/sefrone_api_e2e/e2e/Scenarios/Auth/6_project_endpoints.yaml +0 -0
- {sefrone_api_e2e-1.2.3 → sefrone_api_e2e-1.2.4}/sefrone_api_e2e/e2e/Scenarios/Auth/7_email_2fa_flow.yaml +0 -0
- {sefrone_api_e2e-1.2.3 → sefrone_api_e2e-1.2.4}/sefrone_api_e2e/e2e_scenarios_manager.py +0 -0
- {sefrone_api_e2e-1.2.3 → sefrone_api_e2e-1.2.4}/sefrone_api_e2e/env_patch.py +0 -0
- {sefrone_api_e2e-1.2.3 → sefrone_api_e2e-1.2.4}/sefrone_api_e2e/json_mock_server.py +0 -0
- {sefrone_api_e2e-1.2.3 → sefrone_api_e2e-1.2.4}/sefrone_api_e2e/runner_assets.py +0 -0
- {sefrone_api_e2e-1.2.3 → sefrone_api_e2e-1.2.4}/sefrone_api_e2e/runner_email_mock.py +0 -0
- {sefrone_api_e2e-1.2.3 → sefrone_api_e2e-1.2.4}/sefrone_api_e2e/runner_satim_mock.py +0 -0
- {sefrone_api_e2e-1.2.3 → sefrone_api_e2e-1.2.4}/sefrone_api_e2e/runner_webhook_mock.py +0 -0
- {sefrone_api_e2e-1.2.3 → sefrone_api_e2e-1.2.4}/sefrone_api_e2e/step_runner.py +0 -0
- {sefrone_api_e2e-1.2.3 → sefrone_api_e2e-1.2.4}/sefrone_api_e2e.egg-info/SOURCES.txt +0 -0
- {sefrone_api_e2e-1.2.3 → sefrone_api_e2e-1.2.4}/sefrone_api_e2e.egg-info/dependency_links.txt +0 -0
- {sefrone_api_e2e-1.2.3 → sefrone_api_e2e-1.2.4}/sefrone_api_e2e.egg-info/requires.txt +0 -0
- {sefrone_api_e2e-1.2.3 → sefrone_api_e2e-1.2.4}/sefrone_api_e2e.egg-info/top_level.txt +0 -0
- {sefrone_api_e2e-1.2.3 → sefrone_api_e2e-1.2.4}/setup.cfg +0 -0
|
@@ -222,7 +222,7 @@ class RestApiRunner(StepRunner):
|
|
|
222
222
|
resp = ctx.session.request(**request_kwargs)
|
|
223
223
|
print(f" -> {method} {url} -> {resp.status_code}")
|
|
224
224
|
|
|
225
|
-
if ctx.is_verbose:
|
|
225
|
+
if ctx.is_verbose and "application/json" in resp.headers.get("Content-Type", ""):
|
|
226
226
|
print(f"Response text: {resp.text}")
|
|
227
227
|
|
|
228
228
|
# --- Status assertion ---
|
|
@@ -264,6 +264,23 @@ class RestApiRunner(StepRunner):
|
|
|
264
264
|
except Exception:
|
|
265
265
|
raise AssertionError(f"Response is not valid JSON: {resp.text}")
|
|
266
266
|
|
|
267
|
+
# --- Content-Type assertion ---
|
|
268
|
+
expected_content_type = expect.get("content_type")
|
|
269
|
+
if expected_content_type:
|
|
270
|
+
actual_ct = resp.headers.get("Content-Type", "")
|
|
271
|
+
if expected_content_type not in actual_ct:
|
|
272
|
+
raise AssertionError(
|
|
273
|
+
f"Expected Content-Type to include '{expected_content_type}', got '{actual_ct}'"
|
|
274
|
+
)
|
|
275
|
+
|
|
276
|
+
# --- Save file to disk ---
|
|
277
|
+
if "save_file" in step:
|
|
278
|
+
file_path = ctx.substitute_stored(str(step["save_file"]))
|
|
279
|
+
os.makedirs(os.path.dirname(file_path) if os.path.dirname(file_path) else ".", exist_ok=True)
|
|
280
|
+
with open(file_path, "wb") as f:
|
|
281
|
+
f.write(resp.content)
|
|
282
|
+
print(f" Saved response file -> {file_path}")
|
|
283
|
+
|
|
267
284
|
# --- File SHA256 check ---
|
|
268
285
|
if "file_sha256_matches" in expect:
|
|
269
286
|
local_path = ctx.substitute_stored(expect["file_sha256_matches"])
|
|
@@ -5,7 +5,7 @@ with open("README.md", "r", encoding="utf-8") as fh:
|
|
|
5
5
|
|
|
6
6
|
setup(
|
|
7
7
|
name="sefrone_api_e2e",
|
|
8
|
-
version="1.2.
|
|
8
|
+
version="1.2.4",
|
|
9
9
|
author="Sefrone",
|
|
10
10
|
author_email="contact@sefrone.com",
|
|
11
11
|
description="A Python package to provide e2e testing helpers for sefrone API projects",
|
|
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
|
{sefrone_api_e2e-1.2.3 → sefrone_api_e2e-1.2.4}/sefrone_api_e2e.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|