This repository was archived by the owner on Dec 16, 2025. It is now read-only.
[EPD-369] Update endpoint and topic parsing tests to use string values for cong…#3
Merged
nisseknudsen merged 1 commit intomainfrom Mar 28, 2025
Merged
Conversation
…estion control, priority, and reliability
There was a problem hiding this comment.
Pull Request Overview
This PR updates the tests and associated enums to use descriptive string values for congestion control, priority, and reliability instead of numeric values. The changes ensure that the tests for endpoint and topic parsing validate string representations that match the new enum definitions.
- Updated tests in parse_topics.py to supply string values for congestion control, priority, and reliability.
- Updated tests in parse_endpoints.py to supply string values for congestion control and priority.
- Modified enum definitions in make87/utils.py to subclass from str and use string literal values.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| tests/unit/utils/parse_topics.py | Updated JSON values to be string representations; tests now work with the updated enums. |
| tests/unit/utils/parse_endpoints.py | Updated JSON values to be string representations for congestion control and priority. |
| make87/utils.py | Updated enum definitions to subclass from str and use string literal values. |
Comments suppressed due to low confidence (3)
tests/unit/utils/parse_topics.py:57
- Consider adding an assertion to validate that topics.topics[0].congestion_control is correctly set to the expected enum value (e.g., CongestionControl.DROP) to improve test coverage.
valid_json = '{"topics": [{"topic_name": "test_topic", "topic_key": "test_key", "message_type": "test_type", "topic_type": "PUB", "congestion_control": "DROP"}]}'
tests/unit/utils/parse_endpoints.py:29
- Consider adding an assertion to verify that endpoints[0].congestion_control is correctly set to CongestionControl.DROP after parsing.
valid_json = '{"endpoints": [{"endpoint_name": "test_endpoint", "endpoint_key": "test_key", "requester_message_type": "test_type", "provider_message_type": "test_type", "endpoint_type": "REQ", "congestion_control": "DROP"}]}'
tests/unit/utils/parse_endpoints.py:38
- Consider adding an assertion to check that endpoints[0].priority equals Priority.REAL_TIME, ensuring that the string conversion is handled correctly.
valid_json = '{"endpoints": [{"endpoint_name": "test_endpoint", "endpoint_key": "test_key", "requester_message_type": "test_type", "provider_message_type": "test_type", "endpoint_type": "REQ", "priority": "REAL_TIME"}]}'
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
…estion control, priority, and reliability