コード例 #1
0
ファイル: mangopay.py プロジェクト: kthurimella/liberapay.com
 def setUp(self):
     Harness.setUp(self)
     self.david = self.make_participant(
         "david",
         is_suspicious=False,
         mangopay_user_id=self.david_id,
         mangopay_wallet_id=self.david_wallet_id,
         email="*****@*****.**",
     )
     self.janet = self.make_participant(
         "janet",
         is_suspicious=False,
         mangopay_user_id=self.janet_id,
         mangopay_wallet_id=self.janet_wallet_id,
         email="*****@*****.**",
     )
     self.janet_route = ExchangeRoute.insert(self.janet, "mango-cc", self.card_id)
     self.homer = self.make_participant(
         "homer",
         is_suspicious=False,
         mangopay_user_id=self.homer_id,
         mangopay_wallet_id=self.homer_wallet_id,
         email="*****@*****.**",
     )
     self.homer_route = ExchangeRoute.insert(self.homer, "mango-ba", self.bank_account.Id)
コード例 #2
0
    def setUp(self):
        Harness.setUp(self)

        # Alice joins a community.
        self.alice = self.make_participant('alice', balance=100)
        c = self.alice.create_community('something')
        self.alice.update_community_status('memberships', True, c.id)
コード例 #3
0
    def setUp(self):
        Harness.setUp(self)

        # Alice joins a community.
        self.alice = self.make_participant('alice', balance=100)
        self.client.POST('/alice/communities.json', {'do': 'join:something'},
                         auth_as=self.alice, HTTP_X_REQUESTED_WITH=b'XMLHttpRequest')
コード例 #4
0
    def setUp(self):
        Harness.setUp(self)

        # Alice joins a community.
        self.alice = self.make_participant('alice', balance=100)
        c = self.alice.create_community('something')
        self.alice.update_community_status('memberships', True, c.id)
コード例 #5
0
    def setUp(self):
        Harness.setUp(self)

        # Alice joins a community.
        self.alice = self.make_participant('alice', balance=100)
        self.client.POST('/alice/communities.json', {'do': 'join:something'},
                         auth_as=self.alice, xhr=True)
コード例 #6
0
    def setUp(self):
        Harness.setUp(self)

        # Alice joins a community.
        self.alice = self.make_participant('alice', balance=EUR(100))
        c = self.alice.create_community('C++')
        self.alice.upsert_community_membership(True, c.id)
コード例 #7
0
    def setUp(self):
        Harness.setUp(self)

        # Alice joins a community.
        self.alice = self.make_participant('alice', balance=100)
        c = self.alice.create_community('C++')
        self.alice.upsert_community_membership(True, c.id)
コード例 #8
0
    def setUp(self):
        Harness.setUp(self)

        # Alice joins a community.
        self.alice = self.make_participant('alice')
        self.com = self.alice.create_community('C++')
        self.alice.upsert_community_membership(True, self.com.id)
コード例 #9
0
ファイル: mangopay.py プロジェクト: swipswaps/liberapay.com
 def setUp(self):
     Harness.setUp(self)
     self.david = self.make_participant(
         'david',
         mangopay_user_id=self.david_id,
         mangopay_wallet_id=self.david_wallet_id,
         email='*****@*****.**')
     self.janet = self.make_participant(
         'janet',
         mangopay_user_id=self.janet_id,
         mangopay_wallet_id=self.janet_wallet_id,
         email='*****@*****.**')
     self.janet_route = ExchangeRoute.insert(self.janet,
                                             'mango-cc',
                                             self.card_id,
                                             'chargeable',
                                             currency='EUR')
     self.homer = self.make_participant(
         'homer',
         mangopay_user_id=self.homer_id,
         mangopay_wallet_id=self.homer_wallet_id,
         email='*****@*****.**')
     self.homer_route = ExchangeRoute.insert(self.homer, 'mango-ba',
                                             self.bank_account.Id,
                                             'chargeable')
コード例 #10
0
ファイル: emails.py プロジェクト: Changaco/liberapay.com
 def setUp(self):
     Harness.setUp(self)
     self.mailer_patcher = mock.patch.object(Participant._mailer.messages, 'send')
     self.mailer = self.mailer_patcher.start()
     self.addCleanup(self.mailer_patcher.stop)
     sleep_patcher = mock.patch('liberapay.models.participant.sleep')
     sleep_patcher.start()
     self.addCleanup(sleep_patcher.stop)
コード例 #11
0
    def setUp(self):
        Harness.setUp(self)

        # Alice joins a community.
        self.alice = self.make_participant('alice', balance=100)
        self.client.POST('/alice/communities.json', {'do': 'join:something'},
                         auth_as=self.alice,
                         xhr=True)
コード例 #12
0
 def setUp(self):
     Harness.setUp(self)
     alice = self.make_participant('alice')
     self.community = alice.create_community('test')
     alice.upsert_community_membership(True, self.community.id)
     self.add_participant('bob')
     carl = self.add_participant('carl')
     carl.upsert_community_membership(False, self.community.id)
コード例 #13
0
 def setUp(self):
     Harness.setUp(self)
     alice = self.make_participant('alice')
     self.community = alice.create_community('test')
     alice.update_community_status('memberships', True, self.community.id)
     self.add_participant('bob')
     carl = self.add_participant('carl')
     carl.update_community_status('memberships', False, self.community.id)
コード例 #14
0
    def setUp(self):
        Harness.setUp(self)

        # Grab configuration from the environment, storing for later.
        env = wireup.env()
        self.environ = env.environ

        # Change env, doesn't change self.environ.
        env.canonical_scheme = 'https'
        env.canonical_host = 'example.com'

        wireup.canonical(env)
コード例 #15
0
    def setUp(self):
        Harness.setUp(self)

        # Grab configuration from the environment, storing for later.
        env = wireup.env()
        self.environ = env.environ

        # Change env, doesn't change self.environ.
        env.canonical_scheme = 'https'
        env.canonical_host = 'example.com'

        wireup.canonical(env)
コード例 #16
0
ファイル: mangopay.py プロジェクト: Calinou/liberapay.com
 def setUp(self):
     Harness.setUp(self)
     self.david = self.make_participant(
         'david', mangopay_user_id=self.david_id,
         mangopay_wallet_id=self.david_wallet_id, email='*****@*****.**'
     )
     self.janet = self.make_participant(
         'janet', mangopay_user_id=self.janet_id,
         mangopay_wallet_id=self.janet_wallet_id, email='*****@*****.**'
     )
     self.janet_route = ExchangeRoute.insert(self.janet, 'mango-cc', self.card_id)
     self.homer = self.make_participant(
         'homer', mangopay_user_id=self.homer_id,
         mangopay_wallet_id=self.homer_wallet_id, email='*****@*****.**'
     )
     self.homer_route = ExchangeRoute.insert(self.homer, 'mango-ba', self.bank_account.Id)
コード例 #17
0
 def setUp(self):
     Harness.setUp(self)
     self.client.website.canonical_scheme = 'https'
     self.client.website.canonical_host = 'example.com'
     self._cookie_domain = self.client.website.cookie_domain
     self.client.website.cookie_domain = b'.example.com'
コード例 #18
0
 def setUp(self):
     Harness.setUp(self)
     for username in ['alice', 'bob', 'carl']:
         p = self.make_participant(username, elsewhere='twitter')
         setattr(self, username, p)
コード例 #19
0
 def setUp(self):
     Harness.setUp(self)
     for username in ['alice', 'bob', 'carl']:
         p = self.make_participant(username, elsewhere='twitter')
         setattr(self, username, p)
コード例 #20
0
 def setUp(self):
     Harness.setUp(self)
     self.alice = self.make_participant("alice")
     self.bob = self.make_participant("bob")
     self.community = Community.create('test', self.alice)
コード例 #21
0
 def setUp(self):
     Harness.setUp(self)
     self.alice = self.make_participant("alice")
     self.c_id = str(self.alice.create_community('test').id)
コード例 #22
0
 def setUp(self):
     Harness.setUp(self)
     make_history(self)
コード例 #23
0
 def tearDown(self):
     Harness.tearDown(self)
     website = self.client.website
     website.canonical_scheme = website.env.canonical_scheme
     website.canonical_host = website.env.canonical_host
     website.cookie_domain = self._cookie_domain
コード例 #24
0
ファイル: test_teams.py プロジェクト: Calinou/liberapay.com
 def setUp(self):
     Harness.setUp(self)
     self.team = self.make_participant('A-Team', kind='group')
コード例 #25
0
 def setUp(self):
     Harness.setUp(self)
     self.team = self.make_participant('A-Team', kind='group')
コード例 #26
0
 def setUp(self):
     Harness.setUp(self)
     for participant in ['alice', 'bob']:
         p = self.make_participant(participant, balance=100)
         setattr(self, participant, p)
コード例 #27
0
 def setUp(self):
     Harness.setUp(self)
     self.alice = self.make_participant('alice')
     self.bob = self.make_participant('bob')
コード例 #28
0
ファイル: test_hooks.py プロジェクト: fracolo/liberapay.com
 def setUp(self):
     Harness.setUp(self)
     self.client.website.canonical_scheme = 'https'
     self.client.website.canonical_host = 'example.com'
コード例 #29
0
 def setUp(self):
     Harness.setUp(self)
     self.bar = self.make_participant('bar', is_admin=True)
コード例 #30
0
 def setUp(self):
     Harness.setUp(self)
     self.a_team = self.make_participant('A-Team', kind='group')
     self.alice = self.make_participant('alice')
     self.a_team.add_member(self.alice)
     self.bob = self.make_participant('bob', email='*****@*****.**')
コード例 #31
0
ファイル: test_teams.py プロジェクト: astiob/liberapay.com
 def setUp(self):
     Harness.setUp(self)
     self.a_team = self.make_participant('A-Team', kind='group')
     self.alice = self.make_participant('alice')
     self.a_team.add_member(self.alice)
     self.bob = self.make_participant('bob', email='*****@*****.**')
コード例 #32
0
ファイル: test_stats.py プロジェクト: devmiyax/liberapay.com
 def setUp(self):
     Harness.setUp(self)
     for participant in ['alice', 'bob']:
         p = self.make_participant(participant, balance=100)
         setattr(self, participant, p)
コード例 #33
0
 def setUp(self):
     Harness.setUp(self)
     self.alice = self.make_participant("alice")
     self.bob = self.make_participant("bob")
     self.community = Community.create('test', self.alice.id)
コード例 #34
0
 def setUp(self):
     Harness.setUp(self)
     self.add_participant('alice')
     self.add_participant('bob')
     carl = self.add_participant('carl')
     carl.insert_into_communities(False, 'test', 'test')
コード例 #35
0
 def setUp(self):
     Harness.setUp(self)
     self.alice = self.make_participant("alice")
コード例 #36
0
 def setUp(self):
     Harness.setUp(self)
     self.alice = self.make_participant("alice")
コード例 #37
0
 def setUp(self):
     Harness.setUp(self)
     self.add_participant('alice')
     self.add_participant('bob')
     carl = self.add_participant('carl')
     carl.insert_into_communities(False, 'test', 'test')
コード例 #38
0
 def tearDown(self):
     Harness.tearDown(self)
     reset = Environment(CANONICAL_SCHEME=unicode,
                         CANONICAL_HOST=unicode,
                         environ=self.environ)
     wireup.canonical(reset)
コード例 #39
0
 def setUp(self):
     Harness.setUp(self)
     self.stub = self.make_stub()  # Our protagonist
コード例 #40
0
 def setUp(self):
     Harness.setUp(self)
     self.team = self.make_participant("team", kind='group')
     self.alice = self.make_participant("alice")
コード例 #41
0
 def setUp(self):
     Harness.setUp(self)
     self.stub = self.make_stub()  # Our protagonist
コード例 #42
0
 def tearDown(self):
     Harness.tearDown(self)
     reset = Environment(CANONICAL_SCHEME=unicode, CANONICAL_HOST=unicode, environ=self.environ)
     wireup.canonical(reset)
コード例 #43
0
 def setUp(self):
     Harness.setUp(self)
     make_history(self)
コード例 #44
0
ファイル: test_stats.py プロジェクト: liberapay/liberapay.com
 def setUp(self):
     Harness.setUp(self)
     self.alice = self.make_participant('alice')
     self.alice_card = self.upsert_route(self.alice, 'stripe-card')
     self.bob = self.make_participant('bob')
     self.bob_stripe_account = self.add_payment_account(self.bob, 'stripe')
コード例 #45
0
 def tearDown(self):
     Harness.tearDown(self)
     website = self.client.website
     website.canonical_scheme = website.env.canonical_scheme
     website.canonical_host = website.env.canonical_host
     website.cookie_domain = self._cookie_domain
コード例 #46
0
 def setUp(self):
     Harness.setUp(self)
     self.alice = self.make_participant('alice')
     self.alice_card = self.upsert_route(self.alice, 'stripe-card')
     self.bob = self.make_participant('bob')
     self.bob_stripe_account = self.add_payment_account(self.bob, 'stripe')
コード例 #47
0
 def setUp(self):
     Harness.setUp(self)
     self.alice_elsewhere = self.make_elsewhere('twitter', -1, 'alice')
     token, expires = self.alice_elsewhere.make_connect_token()
     self.connect_cookie = {'connect_%s' % self.alice_elsewhere.id: token}
     self.bob = self.make_participant('bob')
コード例 #48
0
 def setUp(self):
     Harness.setUp(self)
     self.alice_elsewhere = self.make_elsewhere('twitter', -1, 'alice')
     token, expires = self.alice_elsewhere.make_connect_token()
     self.connect_cookie = {'connect_%s' % self.alice_elsewhere.id: token}
     self.bob = self.make_participant('bob')
コード例 #49
0
 def setUp(self):
     Harness.setUp(self)
     self.client.website.canonical_scheme = 'https'
     self.client.website.canonical_host = 'example.com'
     self._cookie_domain = self.client.website.cookie_domain
     self.client.website.cookie_domain = b'.example.com'
コード例 #50
0
ファイル: test_hooks.py プロジェクト: astiob/liberapay.com
 def setUp(self):
     Harness.setUp(self)
     self.client.website.canonical_scheme = 'https'
     self.client.website.canonical_host = 'example.com'
コード例 #51
0
 def setUp(self):
     Harness.setUp(self)
     self.alice = self.make_participant('alice')
     self.bob = self.make_participant('bob')
コード例 #52
0
 def setUp(self):
     Harness.setUp(self)
     self.alice = self.make_participant("alice")
     self.c_id = str(self.alice.create_community('test').id)