Skip to content

Add unit tests for log_broken and update_contribution in fetch_update… #90

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

amankumar100
Copy link

@amankumar100 amankumar100 commented Jul 11, 2025

Fixed Issue #85

Fixed all and unit tested

  • Added tests for log_broken() and update_contribution() in tests/test_fetch_updates.py
  • Ensured both functions behave correctly with expected contribution input
  • Removed unused mocks and patch decorators
  • Verified tests pass using pytest

Only 2 changes have been made added tests and rectified few parts of fetch_updates.py code. Rests are unchanged, showing 9 files due to multiple experimentation in vscode but all other codes remain unchanged.

Now you can cleanly merge.
Screenshot (74)

…s.py

- Added tests for log_broken() and update_contribution() in tests/test_fetch_updates.py
- Ensured both functions behave correctly with expected contribution input
- Removed unused mocks and patch decorators
- Verified tests pass using pytest
Copy link

netlify bot commented Jul 11, 2025

Deploy Preview for processing-contributions ready!

Name Link
🔨 Latest commit b7b91b3
🔍 Latest deploy log https://app.netlify.com/projects/processing-contributions/deploys/6870d6f07c43c000081cb83e
😎 Deploy Preview https://deploy-preview-90--processing-contributions.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Collaborator

@mingness mingness left a comment

Choose a reason for hiding this comment

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

Thanks for this - there are just some cosmetic changes that should be changed first before I review the actual content. In general, don't change the formatting so drastically unless that is the point of the work, thanks.

Also, please remove the pycache folders and their contents from this PR.

Many thanks.

contribution['previousVersions'] = []
contribution['previousVersions'].append(contribution['prettyVersion'])

# update from online
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please leave in the comments that were previously there.

contribution[field] = []
else:
contribution[field] = props[field]
datetime_today = datetime.now(UTC).strftime('%Y-%m-%dT%H:%M:%S%z')
Copy link
Collaborator

Choose a reason for hiding this comment

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

apologies, this comment didn't get added to the previous review:
Also, please revert the formatting and spacing to the previous formatting, since it masks the true changes that have been made. You might need to change your editor to the settings of the current file.

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.

2 participants