Highly-opinionated (ex-bullshit-free) MTPROTO proxy for Telegram. If you use v1.0 or upgrade broke you proxy, please read the chapter Version 2
Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

init_test.go 556B

123456789101112131415161718192021222324252627
  1. package network_test
  2. import (
  3. "net/http/httptest"
  4. "strings"
  5. "github.com/mccutchen/go-httpbin/httpbin"
  6. "github.com/stretchr/testify/suite"
  7. )
  8. type HTTPServerTestSuite struct {
  9. suite.Suite
  10. httpServer *httptest.Server
  11. }
  12. func (suite *HTTPServerTestSuite) SetupSuite() {
  13. suite.httpServer = httptest.NewServer(httpbin.NewHTTPBin().Handler())
  14. }
  15. func (suite *HTTPServerTestSuite) TearDownSuite() {
  16. suite.httpServer.Close()
  17. }
  18. func (suite *HTTPServerTestSuite) HTTPServerAddress() string {
  19. return strings.TrimPrefix(suite.httpServer.URL, "http://")
  20. }