text stringlengths 1 93.6k |
|---|
self.assertIsNotNone(aapi.user_list(2088434))
|
def test_user_4(self):
|
self.assertIsNotNone(aapi.user_related(7314824))
|
def test_user_5(self):
|
self.assertIsNotNone(aapi.search_user('ほし'))
|
self.assertIsNotNone(aapi.user_bookmark_tags_illust())
|
def test_bookmark(self):
|
self.assertIsNotNone(aapi.user_bookmarks_illust(2088434))
|
# def test_bookmark_1(self):
|
# self.assertIsNotNone(aapi.user_bookmark_tags_illust(2088434))
|
# def test_showcase(self):
|
# self.assertIsNotNone(aapi.showcase_article(4616))
|
def test_follow_1(self):
|
self.assertIsNotNone(aapi.user_following(7314824))
|
def test_follow_2(self):
|
self.assertIsNotNone(aapi.user_follower(275527))
|
def test_follow_3(self):
|
self.assertIsNotNone(aapi.user_mypixiv(275527))
|
def test_add(self):
|
self.assertIsNot(aapi.user_follow_add(24687177), {})
|
def test_del(self):
|
self.assertIsNot(aapi.user_follow_del(24687177), {})
|
def test_novel(self):
|
self.assertIsNotNone(aapi.search_novel('abc'))
|
self.assertIsNotNone(aapi.user_novels(2748828))
|
self.assertIsNotNone(aapi.novel_series(0))
|
self.assertIsNotNone(aapi.novel_detail(14588477))
|
self.assertIsNotNone(aapi.novel_text(14588477))
|
def test_tag(self):
|
self.assertIsNotNone(aapi.trending_tags_illust())
|
first_tag = None
|
response = aapi.trending_tags_illust()
|
for trend_tag in response.trend_tags[:10]:
|
if not first_tag:
|
first_tag = trend_tag.tag
|
self.assertIsNotNone(aapi.search_illust(
|
first_tag, search_target='partial_match_for_tags'))
|
def test_ranking(self):
|
self.assertIsNotNone(aapi.illust_ranking('day_male'))
|
self.assertIsNotNone(aapi.illust_follow(req_auth=True))
|
self.assertIsNotNone(aapi.illust_recommended(req_auth=True))
|
def test_bookmark_add(self):
|
illust_id = 74187223
|
tags = ['Fate/GO', '50000users 入り', '私服']
|
self.assertIsNotNone(aapi.illust_bookmark_add(illust_id, tags=tags))
|
self.assertIsNotNone(aapi.illust_bookmark_delete(illust_id))
|
self.assertIsNotNone(aapi.illust_bookmark_detail(illust_id))
|
def test_download(self):
|
self.assertIsNotNone(aapi.illust_ranking('day', date='2016-08-01'))
|
json_result = aapi.illust_ranking('day', date='2019-08-01')
|
# Disabled due to Rate Limit
|
for illust in json_result.illusts[:5]:
|
image_url = illust.meta_single_page.get(
|
'original_image_url', illust.image_urls.large)
|
url_basename = os.path.basename(image_url)
|
extension = os.path.splitext(url_basename)[1]
|
name = "illust_id_%d_%s%s" % (illust.id, illust.title, extension)
|
aapi.download(image_url, path='.', name=name)
|
aapi.download(image_url, path='.', fname=io.BytesIO())
|
self.assertTrue(os.path.exists(name))
|
def test_others(self):
|
newaapi0 = AppPixivAPI()
|
# self.assertIsNotNone(newaapi0.login(_USERNAME, _PASSWORD))
|
self.assertIsNotNone(newaapi0.login(refresh_token=_TOKEN))
|
newaapi = AppPixivAPI()
|
self.assertRaises(error.NoLoginError, newaapi.login, None)
|
newaapi2 = AppPixivAPI()
|
self.assertRaises(error.AuthTokenError,
|
newaapi2.login, refresh_token='89urwei')
|
newaapi3 = AppPixivAPI()
|
self.assertRaises(error.LoginError, newaapi3.login,
|
username='89urwei', password='97324yuieh')
|
self.assertIsNone(newaapi.set_auth('None', 'None'))
|
self.assertIsNone(newaapi.set_client('None', 'None'))
|
self.assertIsNone(newaapi.set_accept_language('ja-jp'))
|
self.assertIsNotNone(utils.Utils().set_params(fsadf=[1, 2, 3]))
|
self.assertIsNone(utils.Utils().parse_qs(None))
|
def test_http_methods(self):
|
loop = asyncio.get_event_loop()
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.