- first edition of weimob wsc.
This commit is contained in:
36
business/partner/purchase/weimob/wsc/wsc_test.go
Normal file
36
business/partner/purchase/weimob/wsc/wsc_test.go
Normal file
@@ -0,0 +1,36 @@
|
||||
package wsc
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils/tasks"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
"git.rosy.net.cn/jx-callback/globals/api"
|
||||
"git.rosy.net.cn/jx-callback/globals/beegodb"
|
||||
"github.com/astaxie/beego"
|
||||
)
|
||||
|
||||
func init() {
|
||||
//E:/goprojects/src/git.rosy.net.cn/jx-callback/conf/app.conf
|
||||
///Users/xujianhua/go/src/git.rosy.net.cn/jx-callback/conf/app.conf
|
||||
beego.InitBeegoBeforeTest("/Users/xujianhua/go/src/git.rosy.net.cn/jx-callback/conf/app.conf")
|
||||
beego.BConfig.RunMode = "dev" // InitBeegoBeforeTest会将runmode设置为test
|
||||
|
||||
globals.Init()
|
||||
beegodb.Init()
|
||||
api.Init()
|
||||
|
||||
if err := tasks.RefreshWeimobToken(); err != nil {
|
||||
globals.SugarLogger.Errorf("RefreshWeimobToken failed with error:%s", err)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
func TestGetVendorCategories(t *testing.T) {
|
||||
vendorCatList, err := new(PurchaseHandler).GetVendorCategories()
|
||||
if err != nil {
|
||||
t.Fatal(err.Error())
|
||||
}
|
||||
globals.SugarLogger.Debug(utils.Format4Output(vendorCatList, false))
|
||||
}
|
||||
Reference in New Issue
Block a user