Skip to content

test: add unit tests for BedrockClassifier#457

Open
hashwnath wants to merge 1 commit into2FastLabs:mainfrom
hashwnath:feat/448-bedrock-classifier-tests
Open

test: add unit tests for BedrockClassifier#457
hashwnath wants to merge 1 commit into2FastLabs:mainfrom
hashwnath:feat/448-bedrock-classifier-tests

Conversation

@hashwnath
Copy link
Copy Markdown

Addresses #448

Adds comprehensive unit tests for BedrockClassifier covering:

  • Initialization: client injection, boto3 auto-creation, default/custom model ID, inference config defaults and overrides
  • Tool schema structure: validates the analyzePrompt tool spec shape and required fields
  • Classification flow: happy path agent selection, confidence conversion, toolChoice behavior for anthropic vs non-anthropic models, custom inference config propagation
  • Error handling: no output, empty tool use, invalid tool input, BotoCoreError, ClientError
  • Callbacks: verifies on_classifier_start and on_classifier_stop are invoked with correct arguments

Follows existing test patterns from test_anthropic_classifier.py (pytest, MockAgent, @patch, @pytest.mark.asyncio).

All 22 tests pass.

Adds comprehensive unit tests for BedrockClassifier covering
initialization, tool schema generation, classification flow,
error handling, and callbacks.
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.

1 participant