| var toUser = "oUN420Wj78vnkNeAJY7RMPXA28oc" // "oUN420bxqFqlx0ZQHciUOesZO3PE" | var toUser = "oUN420Wj78vnkNeAJY7RMPXA28oc" // "oUN420bxqFqlx0ZQHciUOesZO3PE" | ||||
| func TestSendTxt(t *testing.T) { | func TestSendTxt(t *testing.T) { | ||||
| msg := fmt.Sprintf("测试消息 & < >, %s ", time.Now().String()) | msg := fmt.Sprintf("测试消息 & < >, %s ", time.Now().String()) | ||||
| // randinit() | // randinit() | ||||
| } | } | ||||
| func TestSendPic(t *testing.T) { | func TestSendPic(t *testing.T) { | ||||
| kfSendPic(toUser, "media_for_test/200x200.png") | kfSendPic(toUser, "media_for_test/200x200.png") | ||||
| } | } | ||||
| func TestSendVoice(t *testing.T) { | func TestSendVoice(t *testing.T) { | ||||
| kfSendVoice(toUser, "media_for_test/example.amr") | kfSendVoice(toUser, "media_for_test/example.amr") | ||||
| //kfSendVoiceByMediaID(toUser, "8Tc-pcFxEMtbO6T71AaL0A16taJUpwolXpB06mBBfaPZ68R3__1nN7HuZAUyW8xR") | //kfSendVoiceByMediaID(toUser, "8Tc-pcFxEMtbO6T71AaL0A16taJUpwolXpB06mBBfaPZ68R3__1nN7HuZAUyW8xR") | ||||
| } | } | ||||
| func TestSendVideo(t *testing.T) { | func TestSendVideo(t *testing.T) { | ||||
| kfSendVideo(toUser, "media_for_test/video.mp4", "测试时品", "普通描述", "media_for_test/music-thumb.jpg") | kfSendVideo(toUser, "media_for_test/video.mp4", "测试时品", "普通描述", "media_for_test/music-thumb.jpg") | ||||
| // kfSendVideoByMediaID(toUser, | // kfSendVideoByMediaID(toUser, | ||||
| } | } | ||||
| func TestSendMusic(t *testing.T) { | func TestSendMusic(t *testing.T) { | ||||
| tID := uploadThumb("media_for_test/music-thumb.jpg") | tID := uploadThumb("media_for_test/music-thumb.jpg") | ||||
| description := fmt.Sprintf("音乐描述 %s", time.Now().String()) | description := fmt.Sprintf("音乐描述 %s", time.Now().String()) | ||||
| kfSendMusic(toUser, | kfSendMusic(toUser, | ||||
| } | } | ||||
| func TestSendArticle(t *testing.T) { | func TestSendArticle(t *testing.T) { | ||||
| articles := []sendNewsArticle{} | articles := []sendNewsArticle{} | ||||
| for i := 1; i <= 8; i++ { | for i := 1; i <= 8; i++ { | ||||
| a := sendNewsArticle{} | a := sendNewsArticle{} | ||||
| } | } | ||||
| func TestSendArticleByMediaID(t *testing.T) { | func TestSendArticleByMediaID(t *testing.T) { | ||||
| kfSendMPNews(toUser, "e2iNEiSxCX5TV1WbFd0TQP4_MKtjcY1q-4UPIZFrHhw") | kfSendMPNews(toUser, "e2iNEiSxCX5TV1WbFd0TQP4_MKtjcY1q-4UPIZFrHhw") | ||||
| } | } |