Skip to content

test: Add unit tests for Python BedrockClassifier#449

Open
amandladev wants to merge 1 commit intoawslabs:mainfrom
amandladev:test/bedrock-classifier-unit-tests
Open

test: Add unit tests for Python BedrockClassifier#449
amandladev wants to merge 1 commit intoawslabs:mainfrom
amandladev:test/bedrock-classifier-unit-tests

Conversation

@amandladev
Copy link
Copy Markdown

@amandladev amandladev commented Mar 17, 2026

Summary

The Python BedrockClassifier is the primary AWS-native classifier in the framework, yet it had zero dedicated test coverage — unlike its AnthropicClassifier counterpart which already has a full test suite. This PR adds 27 unit tests covering initialization, the Bedrock Converse API integration (tool schema, toolChoice branching per model family), error handling BotoCoreError, ClientError, malformed responses), callback lifecycle, and edge cases. All tests use mocked boto3 clients, so no AWS credentials are needed to run them. This closes a notable gap in test parity across classifiers and helps catch regressions in a core code path.

Fixes #448

Checklist

If your change doesn't seem to apply, please leave them unchecked.

  • I have performed a self-review of this change
  • Changes have been tested
  • Changes are documented
  • I have linked this PR to an existing issue (required)

Acknowledgment

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

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.

Add unit tests for BedrockClassifier in Python

1 participant