15 lines
408 B
Go
15 lines
408 B
Go
package yahoofinance
|
|
|
|
import (
|
|
"net/http"
|
|
"testing"
|
|
)
|
|
|
|
func TestYahooProductionConstructorUsesExplicitDNSGuardedTransport(t *testing.T) {
|
|
client := New().client
|
|
transport, ok := client.Transport.(*http.Transport)
|
|
if !ok || transport.DialContext == nil {
|
|
t.Fatal("Yahoo production constructor has no explicit DNS-guarded dial transport; standard transport can connect after a private DNS answer")
|
|
}
|
|
}
|