Skip to content

test : added unit tests for get_delivery_configuration in notification_service#1709

Open
tmdeveloper007 wants to merge 1 commit into
utksh1:mainfrom
tmdeveloper007:#1706
Open

test : added unit tests for get_delivery_configuration in notification_service#1709
tmdeveloper007 wants to merge 1 commit into
utksh1:mainfrom
tmdeveloper007:#1706

Conversation

@tmdeveloper007

Copy link
Copy Markdown
Contributor

Closes #1706.

Summary of What Has Been Done:
Added testing/backend/unit/test_notification_service_delivery_config.py with 7 unit tests covering get_delivery_configuration in backend/secuscan/notification_service.py.

Changes Made:

  • test_returns_expected_keys: verifies all 4 required keys are present
  • test_webhook_timeout_is_positive_number: webhook_timeout_seconds is a positive number
  • test_webhook_connect_timeout_is_positive_number: webhook_connect_timeout_seconds is a positive number
  • test_max_retries_is_zero: max_retries equals 0
  • test_backoff_factor_is_zero: backoff_factor_seconds equals 0.0
  • test_returns_new_dict_each_call: each call returns an independent dict (no shared mutable state)
  • test_timeout_values_are_reasonable: timeout values are < 300s

Impact it Made:

  • Brings the static delivery configuration function under test coverage
  • Prevents accidental changes to critical timeout and retry values
  • Documents the expected shape of the delivery configuration

Note: This task is being handled by tmdeveloper007 — please assign to that account when picking it up.

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 unit tests for get_delivery_configuration in notification_service

1 participant