Conversation
- Replace question marks (?) with triple underscores (___) in test filenames - Replace ampersands (&) with double underscores (__) in test filenames - Update fronius_mock_server.py to translate URL query parameters to new filename format - All tests pass successfully with the new naming scheme Co-authored-by: nielstron <20638630+nielstron@users.noreply.github.com>
- Replace simple __ replacement with proper URL encoding (%26 for &) - This prevents security issues where crafted URLs with __ could access files - URL-encoding is Windows-safe and prevents ambiguous filename mappings - All 31 tests pass successfully Co-authored-by: nielstron <20638630+nielstron@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Refactor unittest file names to remove reserved characters
Replace Windows-reserved characters in test fixture filenames with URL encoding
Dec 9, 2025
Owner
|
@copilot two things
|
- Add Windows (Python 3.12) to the test matrix to verify Windows compatibility - Add continue-on-error to coveralls upload step to prevent workflow failures - This ensures the workflow doesn't fail if coveralls service is unavailable Co-authored-by: nielstron <20638630+nielstron@users.noreply.github.com>
Contributor
Author
Done in commit a2776f8:
|
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
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.
Test fixture files contained
?and&in filenames to represent HTTP query parameters, preventing repository checkout on Windows where these are reserved characters.Changes
Test fixtures: Renamed 12 files using URL encoding scheme:
?→___(query separator)&→%26(URL-encoded)Example:
GetInverterRealtimeData.cgi?Scope=Device&DeviceId=0→GetInverterRealtimeData.cgi___Scope=Device%26DeviceId=0Mock server: Updated
translate_path()to URL-encode query strings after unquoting incoming requests:This prevents crafted URLs like
/api___param=valuefrom bypassing the encoding to access unintended test fixtures.continue-on-error: trueto coveralls upload step to prevent workflow failures when the service is unavailableTesting
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.