mirror of
https://github.com/TecharoHQ/anubis.git
synced 2025-08-03 09:48:08 -04:00

Imports a patch previously exclusive to Botstopper. Signed-off-by: Xe Iaso <me@xeiaso.net>
18 lines
295 B
Go
18 lines
295 B
Go
package thothmock
|
|
|
|
import (
|
|
"context"
|
|
"testing"
|
|
|
|
"github.com/TecharoHQ/anubis/lib/thoth"
|
|
)
|
|
|
|
func WithMockThoth(t *testing.T) context.Context {
|
|
t.Helper()
|
|
|
|
thothCli := &thoth.Client{}
|
|
thothCli.WithIPToASNService(MockIpToASNService())
|
|
ctx := thoth.With(t.Context(), thothCli)
|
|
return ctx
|
|
}
|