Various minor fixes

* Fix Post.owner_profile in cases where initial owner struct contains id
  only

* Assert node structure is complete enough at Post creation

* Fix get_followees() call in _main()

* Prefer importing from '.' rather than '.<submodule>' in __main__

* Fix name of instaloader_unittests ('-' is illegal in module names)

* Foreport 5fe2a70374
  "Fix downloading of hashtags"

* Foreport 67ac8f3397
  "Enforce being logged in for getting username by id"
This commit is contained in:
Alexander Graf
2018-04-11 10:45:38 +02:00
parent 5b9590a768
commit 25b8165547
4 changed files with 42 additions and 13 deletions

View File

@@ -91,6 +91,7 @@ class TestInstaloader(unittest.TestCase):
print(f['username'])
def test_get_username_by_id(self):
self.L.load_session_from_file(OWN_USERNAME)
self.assertEqual(PUBLIC_PROFILE.lower(),
instaloader.Profile.from_id(self.L.context, PUBLIC_PROFILE_ID).username)