mirror of
https://github.com/rishikanthc/Scriberr.git
synced 2026-03-03 00:27:01 +00:00
test: update PyAnnote test to reflect optional HF token
The HF token parameter is now optional at validation time since it can be provided via the HF_TOKEN environment variable at runtime. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
committed by
Rishikanth Chandrasekaran
parent
ff12270419
commit
850af1fb6e
@@ -370,17 +370,18 @@ func TestPyAnnoteAdapter(t *testing.T) {
|
||||
t.Errorf("Expected positive min speakers, got: %d", minSpeakers)
|
||||
}
|
||||
|
||||
// Test parameter validation - should require HF token
|
||||
// Test parameter validation - hf_token is optional at validation time
|
||||
// (can be provided via HF_TOKEN environment variable at runtime)
|
||||
paramsWithoutToken := map[string]interface{}{
|
||||
"min_speakers": 2,
|
||||
"max_speakers": 4,
|
||||
}
|
||||
|
||||
if err := adapter.ValidateParameters(paramsWithoutToken); err == nil {
|
||||
t.Error("Parameters without HF token should fail validation")
|
||||
if err := adapter.ValidateParameters(paramsWithoutToken); err != nil {
|
||||
t.Errorf("Parameters without HF token should pass validation (token can come from env var): %v", err)
|
||||
}
|
||||
|
||||
// Test with token
|
||||
// Test with token explicitly provided
|
||||
paramsWithToken := map[string]interface{}{
|
||||
"hf_token": "dummy_token",
|
||||
"min_speakers": 2,
|
||||
|
||||
Reference in New Issue
Block a user