offline-twitter/scraper/authentication_test.go

23 lines
384 B
Go
Raw Normal View History

2022-12-10 14:33:27 -05:00
package scraper_test
import (
"offline_twitter/scraper"
"testing"
2022-12-20 19:05:08 -05:00
"github.com/stretchr/testify/assert"
2022-12-10 14:33:27 -05:00
)
func TestAuthentication(t *testing.T) {
2022-12-20 19:05:08 -05:00
assert := assert.New(t)
2022-12-10 14:33:27 -05:00
username := "offline_twatter"
password := "S1pKIW#eRT016iA@OFcK"
api := scraper.NewGuestSession()
api.LogIn(username, password)
2022-12-20 19:05:08 -05:00
assert.True(api.IsAuthenticated)
assert.NotEqual(api.CSRFToken, "")
2022-12-10 14:33:27 -05:00
}