Refactor: Convert server-dependent flow tests to offline mocked tests#1690
Open
VHemanth45 wants to merge 2 commits intoopenml:mainfrom
Open
Refactor: Convert server-dependent flow tests to offline mocked tests#1690VHemanth45 wants to merge 2 commits intoopenml:mainfrom
VHemanth45 wants to merge 2 commits intoopenml:mainfrom
Conversation
Author
|
@geetu040 Please review |
20 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Metadata
Reference Issue: #1649
New Tests Added: Yes (10 new offline mocked test functions)
Documentation Updated: No
Change Log Entry: "Refactor test_flow.py: Convert 11 server-dependent tests to offline mocked tests, improving test speed and CI/CD reliability"
Details:
What does this PR implement?
This PR converts 11 server-dependent tests (marked with @pytest.mark.production_server() or @pytest.mark.test_server()) in test_flow.py to offline unit tests using unittest.mock. The tests now use XML fixture files and mock requests.Session HTTP calls.
What changed:
Created 11 XML fixture files in flows
Converted 10 tests to module-level mocked functions (test_get_flow, test_get_structure, test_tagging, etc.)
Preserved 1 integration test (test_sklearn_to_upload_to_flow) with @pytest.mark.test_server() for end-to-end validation
All 16 tests pass successfully.
Testing
.venv/bin/python -m pytest tests/test_flows/test_flow.py -v