openml-python
openml-python copied to clipboard
test: replace live API calls with proper mocks in test_api_calls
With reference to issue https://github.com/openml/openml-python/issues/1649
Metadata
- Reference Issue: NA
- New Tests Added: Yes
- Documentation Updated: No
- Change Log Entry: Replace live API calls with proper mocks in
test_api_calls
Details
This PR removes live API dependencies from tests/test_openml/test_api_calls.py and replaces them with properly scoped mocks.
Changes include:
- Mocking
requests.Sessioninstead of performing real HTTP requests. - Ensuring authentication endpoints raise
OpenMLNotAuthorizedError. - Removing
@pytest.mark.test_serverdecorators. - Making the Minio cache test OS-stable by comparing
mtimeinstead ofctime.
No production code was modified. All changes are limited to test improvements. Happy to make changes based on feedback. Thankyou!
Hi @geetu040, please give a review to the pr