def test_github_get_friends_for(self):
     platform = self.platforms.github
     user_info = platform.extract_user_info(user_info_examples.github(), '')
     account = AccountElsewhere.upsert(user_info)
     friends, nfriends, pages_urls = platform.get_friends_for(account)
     assert friends
     assert nfriends == len(friends) or nfriends == -1
Example #2
0
 def make_elsewhere(self, platform, user_id, user_name, **kw):
     info = UserInfo( platform=platform
                    , user_id=unicode(user_id)
                    , user_name=user_name
                    , **kw
                    )
     return AccountElsewhere.upsert(info)
 def test_twitter_get_friends_for(self):
     platform = self.platforms.twitter
     user_info = platform.extract_user_info(user_info_examples.twitter(), '')
     account = AccountElsewhere.upsert(user_info)
     friends, nfriends, pages_urls = platform.get_friends_for(account)
     assert friends
     assert nfriends > 0
Example #4
0
 def test_upsert(self):
     for platform in self.platforms:
         domain, user_info = get_user_info_example(platform.name)
         account = AccountElsewhere.upsert(platform.extract_user_info(user_info, domain))
         assert isinstance(account, AccountElsewhere)
 def test_upsert(self):
     for platform in self.platforms:
         user_info = getattr(user_info_examples, platform.name)()
         account = AccountElsewhere.upsert(platform.extract_user_info(user_info))
         assert isinstance(account, AccountElsewhere)
 def test_twitter_get_friends_for(self):
     platform = self.platforms.twitter
     user_info = platform.extract_user_info(user_info_examples.twitter())
     account = AccountElsewhere.upsert(user_info)
     friends, nfriends, pages_urls = platform.get_friends_for(account)
     assert nfriends > 0
Example #7
0
 def test_upsert(self):
     for platform in self.platforms:
         domain, user_info = get_user_info_example(platform.name)
         account = AccountElsewhere.upsert(
             platform.extract_user_info(user_info, domain))
         assert isinstance(account, AccountElsewhere)
Example #8
0
 def make_elsewhere(self, platform, user_id, user_name, **kw):
     info = UserInfo(platform=platform,
                     user_id=str(user_id),
                     user_name=user_name,
                     **kw)
     return AccountElsewhere.upsert(info)
Example #9
0
 def make_elsewhere(self, platform, user_id, user_name, domain='', **kw):
     info = UserInfo(platform=platform, user_id=str(user_id),
                     user_name=user_name, domain=domain, **kw)
     return AccountElsewhere.upsert(info)
Example #10
0
 def test_github_get_friends_for(self):
     platform = self.platforms.github
     user_info = platform.extract_user_info(user_info_examples.github(), '')
     account = AccountElsewhere.upsert(user_info)
     friends, nfriends, pages_urls = platform.get_friends_for(account)
     assert nfriends > 0
Example #11
0
 def test_upsert(self):
     for platform in self.platforms:
         user_info = getattr(user_info_examples, platform.name)()
         account = AccountElsewhere.upsert(
             platform.extract_user_info(user_info))
         assert isinstance(account, AccountElsewhere)