Exemple #1
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)
Exemple #2
0
 def make_elsewhere(self, platform, user_id, user_name, **kw):
     """Factory for :py:class:`~gratipay.models.account_elsewhere.AccountElsewhere`.
     """
     info = UserInfo(platform=platform,
                     user_id=unicode(user_id),
                     user_name=user_name,
                     **kw)
     return AccountElsewhere.upsert(info)
Exemple #3
0
 def test_user_pages(self):
     for platform in self.platforms:
         alice = UserInfo(platform=platform.name,
                          user_id='0',
                          user_name='alice',
                          is_team=False)
         platform.get_user_info = lambda *a: alice
         response = self.client.GET('/on/%s/alice/' % platform.name)
         assert response.code == 200
         assert 'has not joined' in response.body.decode('utf8')
Exemple #4
0
 def make_elsewhere(self,
                    platform,
                    user_id,
                    user_name,
                    is_locked=False,
                    **kw):
     info = UserInfo(platform=platform,
                     user_id=unicode(user_id),
                     user_name=user_name,
                     **kw)
     account = AccountElsewhere.upsert(info)
     if is_locked:
         account.set_is_locked(True)
     return account