Add test suite for Bedrock boto_client_config fix (PR#11) #22
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.
Overview
This PR adds a comprehensive test suite for the critical Bedrock configuration fix implemented in PR #11. The original issue caused
AttributeError: 'dict' object has no attribute 'merge'when launching Strands agents with JSON-parsed Bedrock configurations.Problem Statement
PR #11 fixed the bug where
boto_client_configparameters from JSON configuration files were passed as plain dictionaries instead ofBotocoreConfigobjects, causing runtime errors. However, this critical fix lacked comprehensive test coverage to:Solution
This PR adds 20 comprehensive tests organized in 4 logical test classes:
🧪 Test Coverage
1.
TestBedrockInstance(10 tests)2.
TestBedrockConfigConversion(4 tests)3.
TestBedrockIntegrationScenarios(3 tests)4.
TestRegressionPrevention(3 tests)Key Test Scenarios
✅ Main Fix Verification
✅ JSON Configuration Scenario
✅ Error Demonstration
Changes Made
Files Added
tests/test_models_bedrock.py- Complete test suite (590 lines, 20 tests)Test Quality Features
Test Results
Benefits
Relationship to PR #11
This PR directly supports PR #11 by:
Testing Instructions
Backwards Compatibility
✅ No breaking changes - This PR only adds tests
✅ No production impact - Tests run in isolation with mocking
✅ Fast execution - All 20 tests complete in 0.05 seconds
Closes: Testing gap for PR #11
References: #11 (Bedrock boto_client_config fix)
Type: Test Enhancement
Risk: Low (test-only changes)