Skip to content

test : add comprehensive unit tests for url_validator edge cases - #1313

Open
tmdeveloper007 wants to merge 1 commit into
komalharshita:mainfrom
tmdeveloper007:#1309
Open

test : add comprehensive unit tests for url_validator edge cases#1313
tmdeveloper007 wants to merge 1 commit into
komalharshita:mainfrom
tmdeveloper007:#1309

Conversation

@tmdeveloper007

Copy link
Copy Markdown
Contributor

Summary of What Has Been Done

Created tests/test_url_validator.py with 40 unit tests covering all public functions in src/utils/url_validator.py:

  • is_valid_url: 20 tests (valid URLs with https/http/ports/paths/query/fragments/localhost, invalid None/empty/whitespace/non-string/ftp/mailto/bare-domain/file/relative-path)
  • parse_resource: 9 tests (labeled format, bare URL format, None/empty/non-string/whitespace inputs, edge cases for split marker)
  • validate_resource: 4 tests (valid labeled, invalid labeled, bare valid, bare invalid)
  • validate_resources: 5 tests (valid list, mixed list, empty list, non-list inputs)

Changes Made

  • Created tests/test_url_validator.py with 268 lines of pytest-style tests

Impact it Made

  • Increases test coverage for the url_validator module
  • Documents expected behavior for all edge cases
  • Catches regressions in URL validation logic

Closes #1309

Note: Please assign this PR to the tmdeveloper007 account.

@vercel

vercel Bot commented Jul 24, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the komalsony234-1530's projects Team on Vercel.

A member of the Team first needs to authorize it.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test : add unit tests for url_validator edge cases

1 participant