Пример #1
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 friends
     assert nfriends == len(friends) or nfriends == -1
Пример #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)
Пример #3
0
 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
Пример #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)
Пример #5
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)
Пример #6
0
 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
Пример #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)
Пример #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)
Пример #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)
Пример #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
Пример #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)