From 60d47be2f3230665cce08b5089dffdec64e71604 Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Fri, 24 Aug 2018 12:33:28 +0200 Subject: [PATCH] Unit test for Instaloader.get_highlights() --- test/instaloader_unittests.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/instaloader_unittests.py b/test/instaloader_unittests.py index 5f2a0fb..aece971 100644 --- a/test/instaloader_unittests.py +++ b/test/instaloader_unittests.py @@ -8,6 +8,7 @@ from itertools import islice import instaloader +PROFILE_WITH_HIGHLIGHTS = 325732271 PUBLIC_PROFILE = "selenagomez" PUBLIC_PROFILE_ID = 460563723 HASHTAG = "kitten" @@ -102,6 +103,14 @@ class TestInstaloaderLoggedIn(TestInstaloaderAnonymously): for item in user_story.get_items(): 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): self.post_paging_test(instaloader.Profile.from_username(self.L.context, PRIVATE_PROFILE).get_posts())