Skip to content

feat(sdk): migrate unit test from urllib3-mock to MagicMock #405

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 39 commits into
base: main
Choose a base branch
from

Conversation

naufalandika
Copy link
Contributor

Description

Right now we use urllib3-mock to merlin-sdk's http request. But urllib3-mock is not maintained anymore since 2015 and doesn't work with python 3.11++ because they still use some functions that's removed in python 3.11. Because we want to support python 3.11++ in our sdk we need to migrate the unit test away from urllib3-mock to MagicMock

Modifications

  • Remove all function calls related to urllib3-mock
  • Refactor unit test to use MagicMock

Copy link

codecov bot commented Apr 24, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.94%. Comparing base (9b0ccd2) to head (01479a7).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #405   +/-   ##
=======================================
  Coverage   95.94%   95.94%           
=======================================
  Files          26       26           
  Lines        2098     2098           
=======================================
  Hits         2013     2013           
  Misses         85       85           
Flag Coverage Δ
sdk-test-3.10 95.94% <ø> (ø)
sdk-test-3.11 95.94% <ø> (?)
sdk-test-3.12 95.94% <ø> (?)
sdk-test-3.8 ?
sdk-test-3.9 95.94% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

1 participant