Files
PandaX/pkg/ys/ys_test.go
2023-09-06 09:39:13 +08:00

47 lines
746 B
Go

package ys
import "testing"
func TestYs_GetDeviceList(t *testing.T) {
ys := &Ys{
AppKey: "",
Secret: "",
IsRAM: 0,
AccountID: "",
}
devices, total, err := ys.GetDeviceList(0, 10)
if err != nil {
t.Error(err)
}
t.Log(devices)
t.Log(total)
}
func TestYs_GetDeviceChannelList(t *testing.T) {
ys := &Ys{
AppKey: "",
Secret: "",
IsRAM: 0,
AccountID: "",
}
chans, err := ys.GetDeviceChannelList("BA1996108")
if err != nil {
t.Error(err)
}
t.Log(chans)
}
func TestYs_GetDeviceDeviceLiveAddress(t *testing.T) {
ys := &Ys{
AppKey: "",
Secret: "",
IsRAM: 0,
AccountID: "",
}
live, err := ys.GetDeviceLiveAddress("BA1996108", 1)
if err != nil {
t.Error(err)
}
t.Log(live)
}