add proxy to OpenAccount test
This commit is contained in:
parent
ec5d5dc117
commit
06af7c27bc
1 changed files with 9 additions and 1 deletions
10
auth_test.go
10
auth_test.go
|
|
@ -137,9 +137,17 @@ func TestLoginOpenAccount(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
scraper := twitterscraper.New()
|
scraper := twitterscraper.New()
|
||||||
_, err := scraper.LoginOpenAccount()
|
if proxy != "" && proxyRequired {
|
||||||
|
err := scraper.SetProxy(proxy)
|
||||||
|
if err != nil {
|
||||||
|
panic(fmt.Sprintf("SetProxy() error = %v", err))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
account, err := scraper.LoginOpenAccount()
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("LoginOpenAccount() error = %v", err)
|
t.Fatalf("LoginOpenAccount() error = %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fmt.Printf("%#v", account)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue