mirror of
https://github.com/photoprism/photoprism.git
synced 2025-12-12 08:44:04 +01:00
Fixed classify and nsfw tests
They were broken when the constructors changed to include metadata.
This commit is contained in:
@@ -224,7 +224,7 @@ func TestModel_LoadModel(t *testing.T) {
|
|||||||
err := tensorFlow.loadModel()
|
err := tensorFlow.loadModel()
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
assert.Contains(t, err.Error(), "no such file or directory")
|
assert.Contains(t, err.Error(), "Could not find SavedModel")
|
||||||
}
|
}
|
||||||
|
|
||||||
assert.Error(t, err)
|
assert.Error(t, err)
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import (
|
|||||||
|
|
||||||
var modelPath, _ = filepath.Abs("../../../assets/nsfw")
|
var modelPath, _ = filepath.Abs("../../../assets/nsfw")
|
||||||
|
|
||||||
var detector = NewModel(modelPath, 224, nil, false)
|
var detector = NewModel(modelPath, nil, false)
|
||||||
|
|
||||||
func TestIsSafe(t *testing.T) {
|
func TestIsSafe(t *testing.T) {
|
||||||
detect := func(filename string) Result {
|
detect := func(filename string) Result {
|
||||||
|
|||||||
Reference in New Issue
Block a user