sefrone-api-e2e 1.2.3__tar.gz → 1.2.5__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.
Files changed (28) hide show
  1. {sefrone_api_e2e-1.2.3 → sefrone_api_e2e-1.2.5}/PKG-INFO +1 -1
  2. {sefrone_api_e2e-1.2.3 → sefrone_api_e2e-1.2.5}/sefrone_api_e2e/e2e/Scenarios/Auth/1_normal_auth_flow.yaml +0 -38
  3. {sefrone_api_e2e-1.2.3 → sefrone_api_e2e-1.2.5}/sefrone_api_e2e/runner_rest_api.py +18 -1
  4. {sefrone_api_e2e-1.2.3 → sefrone_api_e2e-1.2.5}/sefrone_api_e2e.egg-info/PKG-INFO +1 -1
  5. {sefrone_api_e2e-1.2.3 → sefrone_api_e2e-1.2.5}/setup.py +1 -1
  6. {sefrone_api_e2e-1.2.3 → sefrone_api_e2e-1.2.5}/README.md +0 -0
  7. {sefrone_api_e2e-1.2.3 → sefrone_api_e2e-1.2.5}/sefrone_api_e2e/__init__.py +0 -0
  8. {sefrone_api_e2e-1.2.3 → sefrone_api_e2e-1.2.5}/sefrone_api_e2e/api_e2e_manager.py +0 -0
  9. {sefrone_api_e2e-1.2.3 → sefrone_api_e2e-1.2.5}/sefrone_api_e2e/e2e/Scenarios/Auth/0_check_features.yaml +0 -0
  10. {sefrone_api_e2e-1.2.3 → sefrone_api_e2e-1.2.5}/sefrone_api_e2e/e2e/Scenarios/Auth/2_account_endpoints.yaml +0 -0
  11. {sefrone_api_e2e-1.2.3 → sefrone_api_e2e-1.2.5}/sefrone_api_e2e/e2e/Scenarios/Auth/3_admin_account_endpoints.yaml +0 -0
  12. {sefrone_api_e2e-1.2.3 → sefrone_api_e2e-1.2.5}/sefrone_api_e2e/e2e/Scenarios/Auth/4_workspace_endpoints.yaml +0 -0
  13. {sefrone_api_e2e-1.2.3 → sefrone_api_e2e-1.2.5}/sefrone_api_e2e/e2e/Scenarios/Auth/5_apikey_endpoints.yaml +0 -0
  14. {sefrone_api_e2e-1.2.3 → sefrone_api_e2e-1.2.5}/sefrone_api_e2e/e2e/Scenarios/Auth/6_project_endpoints.yaml +0 -0
  15. {sefrone_api_e2e-1.2.3 → sefrone_api_e2e-1.2.5}/sefrone_api_e2e/e2e/Scenarios/Auth/7_email_2fa_flow.yaml +0 -0
  16. {sefrone_api_e2e-1.2.3 → sefrone_api_e2e-1.2.5}/sefrone_api_e2e/e2e_scenarios_manager.py +0 -0
  17. {sefrone_api_e2e-1.2.3 → sefrone_api_e2e-1.2.5}/sefrone_api_e2e/env_patch.py +0 -0
  18. {sefrone_api_e2e-1.2.3 → sefrone_api_e2e-1.2.5}/sefrone_api_e2e/json_mock_server.py +0 -0
  19. {sefrone_api_e2e-1.2.3 → sefrone_api_e2e-1.2.5}/sefrone_api_e2e/runner_assets.py +0 -0
  20. {sefrone_api_e2e-1.2.3 → sefrone_api_e2e-1.2.5}/sefrone_api_e2e/runner_email_mock.py +0 -0
  21. {sefrone_api_e2e-1.2.3 → sefrone_api_e2e-1.2.5}/sefrone_api_e2e/runner_satim_mock.py +0 -0
  22. {sefrone_api_e2e-1.2.3 → sefrone_api_e2e-1.2.5}/sefrone_api_e2e/runner_webhook_mock.py +0 -0
  23. {sefrone_api_e2e-1.2.3 → sefrone_api_e2e-1.2.5}/sefrone_api_e2e/step_runner.py +0 -0
  24. {sefrone_api_e2e-1.2.3 → sefrone_api_e2e-1.2.5}/sefrone_api_e2e.egg-info/SOURCES.txt +0 -0
  25. {sefrone_api_e2e-1.2.3 → sefrone_api_e2e-1.2.5}/sefrone_api_e2e.egg-info/dependency_links.txt +0 -0
  26. {sefrone_api_e2e-1.2.3 → sefrone_api_e2e-1.2.5}/sefrone_api_e2e.egg-info/requires.txt +0 -0
  27. {sefrone_api_e2e-1.2.3 → sefrone_api_e2e-1.2.5}/sefrone_api_e2e.egg-info/top_level.txt +0 -0
  28. {sefrone_api_e2e-1.2.3 → sefrone_api_e2e-1.2.5}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sefrone_api_e2e
3
- Version: 1.2.3
3
+ Version: 1.2.5
4
4
  Summary: A Python package to provide e2e testing helpers for sefrone API projects
5
5
  Home-page: https://bitbucket.org/sefrone/sefrone_pypi
6
6
  Author: Sefrone
@@ -90,44 +90,6 @@ steps:
90
90
  ChangeAccountPermissions: string
91
91
  ChangeAccountCredentials: string
92
92
 
93
- - name: "Get user info using deprecated login check endpoint"
94
- method: "POST"
95
- endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/login/check/{$stored.login_token}"
96
- expect:
97
- status: 200
98
- body:
99
- errorCode: number
100
- errorCodeStr: string
101
- message: string
102
- response:
103
- accountId: string
104
- projectId: string
105
- project: string
106
- accountType: string
107
- credentialType: string
108
- isActive: boolean
109
- username: string
110
- linkedWorkspaces:
111
- - workspaceId: string
112
- workspaceName: string
113
- workspaceDescription: string
114
- permissions:
115
- Projects: string
116
- Workspaces: string
117
- ListWorkspaces: string
118
- Accounts: string
119
- ApiKeys: string
120
- AuthStats: string
121
- AccountState: string
122
- ChangeAccountPermissions: string
123
- ChangeAccountCredentials: string
124
- token: string
125
- tokenExpiryDate: datetime
126
- assertions:
127
- - "{{body.response.accountId}} == '{$stored.login_account_id}'"
128
- - "{{body.response.username}} == 'admin'"
129
- - "{{body.response.accountType}} == 'root'"
130
-
131
93
  - name: "Create guest account"
132
94
  skip_if:
133
95
  - "GuestAccount not in {$stored.0_check_features.enabled_features}"
@@ -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"])
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sefrone_api_e2e
3
- Version: 1.2.3
3
+ Version: 1.2.5
4
4
  Summary: A Python package to provide e2e testing helpers for sefrone API projects
5
5
  Home-page: https://bitbucket.org/sefrone/sefrone_pypi
6
6
  Author: Sefrone
@@ -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.3",
8
+ version="1.2.5",
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",