Refactor tests for improved readability and fixture consistency

- Reformatted headers in E2E tests to improve readability and ensure consistent style.
- Updated confidential client fixture to use bcrypt for secret hashing, enhancing security and testing backward compatibility with legacy SHA-256 hashes.
- Added new test cases for PKCE verification, rejecting insecure 'plain' methods, and improved error handling.
- Refined session workflows and user agent handling in E2E tests for session management.
- Consolidated schema operation tests and fixed minor formatting inconsistencies.
This commit is contained in:
Felipe Cardoso
2025-11-26 00:13:53 +01:00
parent 400d6f6f75
commit 0ea428b718
6 changed files with 112 additions and 38 deletions

View File

@@ -160,7 +160,9 @@ if SCHEMATHESIS_AVAILABLE:
def test_schema_has_user_operations(self):
"""Verify user-related operations exist."""
user_ops = list(schema.include(path_regex=r".*users.*").get_all_operations())
user_ops = list(
schema.include(path_regex=r".*users.*").get_all_operations()
)
assert len(user_ops) > 0, "No user operations found"
def test_schema_has_organization_operations(self):
@@ -172,7 +174,9 @@ if SCHEMATHESIS_AVAILABLE:
def test_schema_has_admin_operations(self):
"""Verify admin-related operations exist."""
admin_ops = list(schema.include(path_regex=r".*admin.*").get_all_operations())
admin_ops = list(
schema.include(path_regex=r".*admin.*").get_all_operations()
)
assert len(admin_ops) > 0, "No admin operations found"
def test_schema_has_session_operations(self):