Skip to content
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

handle custom __new__ arguments in Minio mock fixture and few adjustments #40

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

satheler
Copy link
Contributor

@satheler satheler commented Jan 8, 2025

Change Summary

  • Resolved an issue where extra arguments passed to a custom new method caused instantiation errors.
  • Updated the minio_mock fixture to ensure new is properly patched and restored.
  • Introduced a permanent stub for Minio.new to handle instantiation arguments correctly when restoring the patch.
  • Updated _base_url to parse and normalize the endpoint URL, ensuring consistent handling of secure and non-secure connections.

Related issue number

Checklist

  • code is ready
  • add tests
  • all tests passing
  • test coverage did not drop
  • PR is ready for review

Thanks @bernd-k1337 for solution!

@satheler
Copy link
Contributor Author

satheler commented Jan 8, 2025

Please review @oussjarrousse and @bernd-k1337.

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.

TypeError: object.__new__() takes exactly one argument (the type to instantiate)
2 participants