withthothmock.go 295 B

1234567891011121314151617
  1. package thothmock
  2. import (
  3. "context"
  4. "testing"
  5. "github.com/TecharoHQ/anubis/lib/thoth"
  6. )
  7. func WithMockThoth(t *testing.T) context.Context {
  8. t.Helper()
  9. thothCli := &thoth.Client{}
  10. thothCli.WithIPToASNService(MockIpToASNService())
  11. ctx := thoth.With(t.Context(), thothCli)
  12. return ctx
  13. }