Skip to content

add unit tests for request_context.py#641

Open
indhumitha wants to merge 1 commit into
utksh1:mainfrom
indhumitha:test/request_context_unit
Open

add unit tests for request_context.py#641
indhumitha wants to merge 1 commit into
utksh1:mainfrom
indhumitha:test/request_context_unit

Conversation

@indhumitha
Copy link
Copy Markdown

Description

Added direct unit test coverage for backend/secuscan/request_context.py.
The new tests verify:

  • Generation of a request ID when no ID is provided.
  • Caller-provided request ID overrides.
  • Deterministic behavior by mocking uuid4() for predictable generated IDs.

Related Issues

Closes #564


Type of Change

Bug fix (non-breaking change that adds missing unit test coverage)


How Has This Been Tested?

Ran the following command locally:
python -m pytest testing/backend/unit/test_request_context.py

Result:

  • 3 tests collected
  • 3 tests passed successfully.

Checklist

  • Code follows the project's existing style and testing conventions.
  • Performed a self-review of the changes.
  • Documentation changes are not required for this update.
  • No additional warnings introduced by these changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[TEST] Add request_context coverage for generated and overridden request IDs

1 participant