Unit test for Instaloader.get_highlights()
This commit is contained in:
parent
f988762cb1
commit
60d47be2f3
@ -8,6 +8,7 @@ from itertools import islice
|
|||||||
|
|
||||||
import instaloader
|
import instaloader
|
||||||
|
|
||||||
|
PROFILE_WITH_HIGHLIGHTS = 325732271
|
||||||
PUBLIC_PROFILE = "selenagomez"
|
PUBLIC_PROFILE = "selenagomez"
|
||||||
PUBLIC_PROFILE_ID = 460563723
|
PUBLIC_PROFILE_ID = 460563723
|
||||||
HASHTAG = "kitten"
|
HASHTAG = "kitten"
|
||||||
@ -102,6 +103,14 @@ class TestInstaloaderLoggedIn(TestInstaloaderAnonymously):
|
|||||||
for item in user_story.get_items():
|
for item in user_story.get_items():
|
||||||
print(item)
|
print(item)
|
||||||
|
|
||||||
|
def test_highlights_paging(self):
|
||||||
|
for user_highlight in self.L.get_highlights(PROFILE_WITH_HIGHLIGHTS):
|
||||||
|
print("Retrieving {} highlights \"{}\" from profile {}".format(user_highlight.itemcount,
|
||||||
|
user_highlight.title,
|
||||||
|
user_highlight.owner_username))
|
||||||
|
for item in user_highlight.get_items():
|
||||||
|
print(item)
|
||||||
|
|
||||||
def test_private_profile_paging(self):
|
def test_private_profile_paging(self):
|
||||||
self.post_paging_test(instaloader.Profile.from_username(self.L.context, PRIVATE_PROFILE).get_posts())
|
self.post_paging_test(instaloader.Profile.from_username(self.L.context, PRIVATE_PROFILE).get_posts())
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user