12345678910111213141516171819202122 |
- package gocaptcha
- import (
- "app.yhyue.com/moapp/jybase/go-xweb/httpsession"
- "app.yhyue.com/moapp/jybase/redis"
- "net/http"
- "testing"
- "time"
- )
- func TestCaptcha(t *testing.T) {
- redis.InitRedisBySize("other=172.20.45.129:1712", 100, 30, 300)
- InitCaptcha()
- var (
- W http.ResponseWriter
- R *http.Request
- Session = &httpsession.Session{}
- )
- Session.SetId("001")
- Get(Session, "--", W, R)
- time.Sleep(10 * time.Second)
- }
|