Skip to content

test : added pytest unit tests for validation/csv_validator.py#1869

Open
tmdeveloper007 wants to merge 1 commit into
gopaljilab:mainfrom
tmdeveloper007:#1864
Open

test : added pytest unit tests for validation/csv_validator.py#1869
tmdeveloper007 wants to merge 1 commit into
gopaljilab:mainfrom
tmdeveloper007:#1864

Conversation

@tmdeveloper007

Copy link
Copy Markdown
Contributor

Closes #1864.

Summary of What Has Been Done:
Added pytest tests for validation/csv_validator.py covering file size limits (10MB), required clinical headers validation, extension allowlist (.csv/.txt only), and binary format rejection via magic bytes (PE/MZ, ELF, Mach-O) and shebang headers. All 18 tests pass.

Changes Made:

  • tests/test_csv_validator.py (new file): 184 lines

Impact it Made:

  • Guards CSV upload pipeline against malicious file uploads
  • Increases Python test coverage for validation layer
  • Verified: python3 -m pytest tests/test_csv_validator.py -v --noconftest (18 passed)

Note: Please assign this PR to the tmdeveloper007 account.

@vercel

vercel Bot commented Jun 24, 2026

Copy link
Copy Markdown

@tmdeveloper007 is attempting to deploy a commit to the gopaljilab's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions Bot added the type:testing Adding, updating, or fixing unit/integration tests. label Jun 24, 2026
Cover file size limits, required headers validation, extension allowlist,
and binary format rejection (PE/MZ, ELF, Mach-O, shebang). 18 tests pass.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:testing Adding, updating, or fixing unit/integration tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test : add pytest unit tests for validation/csv_validator.py

1 participant