Skip to content

Add mock-based unit tests for osv_source.py #5019

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

NeilMathew-git
Copy link

This PR adds mock-based unit tests for osv_source.py to improve test coverage without relying on real API calls or external data. It uses AsyncMock and simulated file content to test key OSV behaviors in isolation.

@JigyasuRajput
Copy link
Contributor

hey! @NeilMathew-git,
thanks for looking into this, can you please double check the changes as currently it shows "0 lines changes", also it's generally a good practice to mention the issue you're working on!

@NeilMathew-git
Copy link
Author

Hey! Thanks for the heads up — looks like I might’ve missed committing the changes properly. I’ll double-check my local branch and push the correct changes shortly. Also noted on mentioning the issue — I’ll be sure to edit it in the description. Appreciate the feedback!

Copy link
Contributor

@terriko terriko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see you've already got good feedback above, so I'm just marking this as needing 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.

3 participants