This commit is contained in:
苏尹岚
2020-10-19 15:51:41 +08:00
parent 50ec6409b0
commit c741ad227a
5 changed files with 35 additions and 18 deletions

View File

@@ -20,11 +20,11 @@ func init() {
baseapi.Init(sugarLogger)
// 自有应用
api = New("1039586024", "4885d07c2997b661102e4b6099c0bf3b")
api.SetToken("852dd259dc244c579e2a987857932606")
// api = New("1039586024", "4885d07c2997b661102e4b6099c0bf3b")
// api.SetToken("07e5895c70114395a285ae20119d83b1")
// 开放应用
// api = New("1098307169", "d5eedb40c99e6691b1ca2ba82a363d6a")
api = New("1098307169", "d5eedb40c99e6691b1ca2ba82a363d6a")
}
func handleError(t *testing.T, err error) {
@@ -65,13 +65,13 @@ func TestPrintMsgWithToken(t *testing.T) {
}
func TestGetPrintStatus(t *testing.T) {
state, err := api.GetPrintStatus("4004615546")
state, err := api.GetPrintStatus("4004653390")
handleError(t, err)
baseapi.SugarLogger.Debug(state)
}
func TestGetPrintStatusWithToken(t *testing.T) {
state, err := api.GetPrintStatusWithToken("4004617242", "88de89a384714436a5d1ca23e8991e15")
state, err := api.GetPrintStatusWithToken("4004653390", "07e5895c70114395a285ae20119d83b1")
handleError(t, err)
baseapi.SugarLogger.Debug(state)
}