Fix anon username from id (find renamed profile)

maybe related to #95, #104, 67ac8f3397.
This commit is contained in:
Alexander Graf
2018-05-01 13:06:06 +02:00
parent 1469064176
commit 2722da6ae4
5 changed files with 28 additions and 14 deletions

View File

@@ -54,6 +54,10 @@ class TestInstaloaderAnonymously(unittest.TestCase):
self.assertEqual(PUBLIC_PROFILE_ID,
instaloader.Profile.from_username(self.L.context, PUBLIC_PROFILE).userid)
def test_get_username_by_id(self):
self.assertEqual(PUBLIC_PROFILE.lower(),
instaloader.Profile.from_id(self.L.context, PUBLIC_PROFILE_ID).username)
def test_post_from_mediaid(self):
for post in instaloader.Profile.from_username(self.L.context, PUBLIC_PROFILE).get_posts():
post2 = instaloader.Post.from_mediaid(self.L.context, post.mediaid)