-// fakeBot is a fake Bot API server for testBotToken. getUpdates returns the
-// added updates from the offset on, or waits a short time when there are none.
-// The other methods succeed, unless fail gives an error answer for a call. An
-// answer with HTTP 429 asks for a wait of one second. When stall is true for a
-// call, the call gets no answer until the client gives it up or the test ends.
-// Fail and stall run with the mutex held.
-type fakeBot struct {
- *httptest.Server
-
- mutex sync.Mutex
- updates []botUpdate
- calls []fakeBotCall
- fail func(call fakeBotCall) (int, string)
- stall func(call fakeBotCall) bool
- added chan struct{}
- stopped chan struct{}
-}
-
-// fakeBotCall is one call of the fake Bot API. OK tells if the call got a