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)
    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)
    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)
    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)
    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')
    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)
Example #7
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)
Example #8
0
 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)
Example #9
0
 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')
Example #10
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)
Example #11
0
 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)
Example #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)
Example #13
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)
Example #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)
Example #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)
Example #16
0
 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)
Example #17
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')
 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'
Example #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)
 def setUp(self):
     Harness.setUp(self)
     for username in ['alice', 'bob', 'carl']:
         p = self.make_participant(username, elsewhere='twitter')
         setattr(self, username, p)
Example #21
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)
Example #22
0
 def setUp(self):
     Harness.setUp(self)
     self.alice = self.make_participant("alice")
     self.c_id = str(self.alice.create_community('test').id)
Example #23
0
 def setUp(self):
     Harness.setUp(self)
     make_history(self)
Example #24
0
 def setUp(self):
     Harness.setUp(self)
     self.team = self.make_participant('A-Team', kind='group')
Example #25
0
 def setUp(self):
     Harness.setUp(self)
     self.team = self.make_participant('A-Team', kind='group')
Example #26
0
 def setUp(self):
     Harness.setUp(self)
     for participant in ['alice', 'bob']:
         p = self.make_participant(participant, balance=100)
         setattr(self, participant, p)
Example #27
0
 def setUp(self):
     Harness.setUp(self)
     self.alice = self.make_participant("alice")
     self.c_id = str(self.alice.create_community('test').id)
Example #28
0
 def setUp(self):
     Harness.setUp(self)
     self.alice = self.make_participant('alice')
     self.bob = self.make_participant('bob')
Example #29
0
 def setUp(self):
     Harness.setUp(self)
     self.client.website.canonical_scheme = 'https'
     self.client.website.canonical_host = 'example.com'
 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'
 def setUp(self):
     Harness.setUp(self)
     self.bar = self.make_participant('bar', is_admin=True)
 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')
Example #33
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')
Example #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')
Example #35
0
 def setUp(self):
     Harness.setUp(self)
     self.alice = self.make_participant("alice")
 def setUp(self):
     Harness.setUp(self)
     self.alice = self.make_participant('alice')
     self.bob = self.make_participant('bob')
 def setUp(self):
     Harness.setUp(self)
     self.stub = self.make_stub()  # Our protagonist
 def setUp(self):
     Harness.setUp(self)
     self.team = self.make_participant("team", kind='group')
     self.alice = self.make_participant("alice")
Example #39
0
 def setUp(self):
     Harness.setUp(self)
     self.stub = self.make_stub()  # Our protagonist
Example #40
0
 def setUp(self):
     Harness.setUp(self)
     for participant in ['alice', 'bob']:
         p = self.make_participant(participant, balance=100)
         setattr(self, participant, p)
Example #41
0
 def setUp(self):
     Harness.setUp(self)
     make_history(self)
Example #42
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')
Example #43
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='*****@*****.**')
Example #44
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')
Example #45
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='*****@*****.**')
Example #46
0
 def setUp(self):
     Harness.setUp(self)
     self.client.website.canonical_scheme = 'https'
     self.client.website.canonical_host = 'example.com'
 def setUp(self):
     Harness.setUp(self)
     self.alice = self.make_participant("alice")
Example #48
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)