def setup(self): self.api = API(client_id, token=token)
def setUp(self): self.api = API('091e43d72fe4466a0433', token=token)
def test_exception(): api = API('1333', token={}) try: api.user() except AuthException: assert True
{ "token_type": "Bearer", "state": "PwoXRkUFNdcbeKeWSNVddLjN4beoUy", "access_token": "rsrLV1WaBpzzMYsrTZAjfRJmq8oKVz", "scope": [ "read", "write" ], "expires_in": "2592000", "expires_at": 1451613656.925714 } ''' DICT_FOLDER = '/Users/jingweigu/Google Drive/sync/' api = API('091e43d72fe4466a0433', token=json.loads(token)) def forgetAll(learning_id): print(api.forget(learning_id)) def loadDictFile(): dictFiles = [ f for f in listdir(DICT_FOLDER) if isfile(join(DICT_FOLDER, f)) and f.endswith('xml') ] wordList = [] for f in dictFiles: tree = ET.parse(join(DICT_FOLDER, f))