Skip to content

Fix PubSubInterceptor for None headers and enhance testing#64

Merged
craig8 merged 2 commits intodevelopfrom
update-imports
Oct 1, 2025
Merged

Fix PubSubInterceptor for None headers and enhance testing#64
craig8 merged 2 commits intodevelopfrom
update-imports

Conversation

@craig8
Copy link
Copy Markdown
Contributor

@craig8 craig8 commented Oct 1, 2025

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.

craig8 added 2 commits October 1, 2025 15:35
…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

Call to deprecated function tempfile.mktemp may be insecure.
"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

Call to deprecated function tempfile.mktemp may be insecure.
@craig8 craig8 merged commit bcb99e5 into develop Oct 1, 2025
2 of 7 checks passed
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.

2 participants