People: Revert marker form and test #22
This commit is contained in:
parent
003982afe0
commit
c315c58bb5
2 changed files with 22 additions and 22 deletions
|
@ -10,7 +10,7 @@ type Marker struct {
|
||||||
SubjectUID string `json:"SubjectUID"`
|
SubjectUID string `json:"SubjectUID"`
|
||||||
SubjectSrc string `json:"SubjectSrc"`
|
SubjectSrc string `json:"SubjectSrc"`
|
||||||
Score int `json:"Score"`
|
Score int `json:"Score"`
|
||||||
Invalid bool `json:"Invalid"`
|
MarkerInvalid bool `json:"Invalid"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewMarker(m interface{}) (f Marker, err error) {
|
func NewMarker(m interface{}) (f Marker, err error) {
|
||||||
|
|
|
@ -15,7 +15,7 @@ func TestNewMarker(t *testing.T) {
|
||||||
SubjectUID string
|
SubjectUID string
|
||||||
SubjectSrc string
|
SubjectSrc string
|
||||||
Score int
|
Score int
|
||||||
Invalid bool
|
MarkerInvalid bool
|
||||||
}{
|
}{
|
||||||
MarkerType: "face",
|
MarkerType: "face",
|
||||||
MarkerSrc: "image",
|
MarkerSrc: "image",
|
||||||
|
@ -23,7 +23,7 @@ func TestNewMarker(t *testing.T) {
|
||||||
SubjectUID: "3h59wvth837b5vyiub35",
|
SubjectUID: "3h59wvth837b5vyiub35",
|
||||||
SubjectSrc: "meta",
|
SubjectSrc: "meta",
|
||||||
Score: 100,
|
Score: 100,
|
||||||
Invalid: true,
|
MarkerInvalid: true,
|
||||||
}
|
}
|
||||||
|
|
||||||
f, err := NewMarker(m)
|
f, err := NewMarker(m)
|
||||||
|
@ -38,6 +38,6 @@ func TestNewMarker(t *testing.T) {
|
||||||
assert.Equal(t, "3h59wvth837b5vyiub35", f.SubjectUID)
|
assert.Equal(t, "3h59wvth837b5vyiub35", f.SubjectUID)
|
||||||
assert.Equal(t, "meta", f.SubjectSrc)
|
assert.Equal(t, "meta", f.SubjectSrc)
|
||||||
assert.Equal(t, 100, f.Score)
|
assert.Equal(t, 100, f.Score)
|
||||||
assert.Equal(t, true, f.Invalid)
|
assert.Equal(t, true, f.MarkerInvalid)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue