add GetAccountSettings and GetAccountList
This commit is contained in:
parent
807bccc9f5
commit
7a9256072f
3 changed files with 91 additions and 117 deletions
35
settings_test.go
Normal file
35
settings_test.go
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
package twitterscraper_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestGetAccountSettings(t *testing.T) {
|
||||
if skipAuthTest {
|
||||
t.Skip("Skipping test due to environment variable")
|
||||
}
|
||||
|
||||
settings, err := testScraper.GetAccountSettings()
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
|
||||
if settings.ScreenName == "" {
|
||||
t.Error("ScreenName is empty")
|
||||
}
|
||||
}
|
||||
|
||||
func TestGetAccountList(t *testing.T) {
|
||||
if skipAuthTest {
|
||||
t.Skip("Skipping test due to environment variable")
|
||||
}
|
||||
|
||||
accounts, err := testScraper.GetAccountList()
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
|
||||
if len(accounts) < 1 {
|
||||
t.Errorf("Returned %d accounts", len(accounts))
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue