MCPcopy Create free account
hub / github.com/docker/docker-agent / TestLoadCaps_ModelNotFound

Function TestLoadCaps_ModelNotFound

pkg/modelinfo/modelinfo_test.go:509–519  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

507}
508
509func TestLoadCaps_ModelNotFound(t *testing.T) {
510 t.Parallel()
511
512 store := modelsdev.NewDatabaseStore(&modelsdev.Database{Providers: map[string]modelsdev.Provider{}})
513
514 mc := LoadCaps(t.Context(), store, modelsdev.NewID("unknown", "nonexistent-model"))
515
516 assert.False(t, mc.Supports("image/jpeg"))
517 assert.False(t, mc.Supports("application/pdf"))
518 assert.True(t, mc.Supports("text/plain"))
519}
520
521func TestLoadCaps_OfficeDocsNotAllowed(t *testing.T) {
522 t.Parallel()

Callers

nothing calls this directly

Calls 5

NewDatabaseStoreFunction · 0.92
NewIDFunction · 0.92
LoadCapsFunction · 0.85
ContextMethod · 0.80
SupportsMethod · 0.80

Tested by

no test coverage detected