Fix PubSubInterceptor for None headers and enhance testing#64
Merged
Fix PubSubInterceptor for None headers and enhance testing#64
Conversation
…d add driver fixture tests - Updated PubSubInterceptor to handle None headers by initializing them to an empty dictionary. - Changed import statements in test_pubsub.py to use unittest.mock instead of mock. - Added a new test file test_driver_fixture_pattern.py to verify driver testing patterns with volttrontesting fixtures. - Enhanced test_platformwrapper.py to ensure compatibility with mock message bus and updated assertions accordingly. - Modified test_the_test_server.py to improve agent subscription and logging tests, including the use of intercept_agent_pubsub.
…wrapper and server_mock for improved mock functionality
| } | ||
| } | ||
| } | ||
| main_config_path = Path(tempfile.mktemp(suffix="_main_driver_config.json")) |
Check failure
Code scanning / CodeQL
Insecure temporary file High test
| "driver_type": "fake", | ||
| "active": True | ||
| } | ||
| device_config_path = Path(tempfile.mktemp(suffix="_driver_config.json")) |
Check failure
Code scanning / CodeQL
Insecure temporary file High test
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.
Update PubSubInterceptor to handle None headers by initializing them to an empty dictionary. Refactor tests to use unittest.mock, add new driver fixture tests, and improve existing tests for compatibility with mock functionality. Enhance agent subscription and logging tests for better reliability.