<commit_before>package dropbox

import (
	"testing"
)

var (
	accessToken = "<KEY>"
)

func getApi() *DropboxApi {
	oauth2 := &OAuth2{AccessToken: accessToken}
	dropboxApi := &DropboxApi{Signer: oauth2, Root: "sandbox", Locale: "CN"}
	return dropboxApi
}

func TestGetAccountInfo(t *testing.T) {
	dropboxApi := getApi()

	accountInfo, err := dropboxApi.GetAccountInfo()
	if err != nil {
		t.Logf("account msg: %s\n", err)
		t.Fail()
	} else {<commit_msg>if no accessToken is gived, then panic !<commit_after>package dropbox

import (
	"testing"
	"strings"
)

var (
	accessToken = "" // you access token here
)

func getApi() *DropboxApi {
    if strings.EqualFold("", accessToken) {
        panic("no accessToken is gived .")
    }

	oauth2 := &OAuth2{AccessToken: accessToken}
	dropboxApi := &DropboxApi{Signer: oauth2, Root: "sandbox", Locale: "CN"}
	return dropboxApi
}

func TestGetAccountInfo(t *testing.T) {
	dropboxApi := getApi()

	accountInfo, err := dropboxApi.GetAccountInfo()
	if err != nil {
		t.Logf("account msg: %s\n", err)
		t.Fail()
	} else {
{'fraction_non_alphanumeric': 0.15, 'fraction_numerical': 0.005660377358490566, 'mean_word_length': 4.305, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5594667', 'n_tokens_mistral': 409, 'n_tokens_neox': 399, 'n_words': 96}