Example #1
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)
    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, 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('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=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)
        c = self.alice.create_community('C++')
        self.alice.upsert_community_membership(True, c.id)
Example #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)
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)
     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 #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)
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 = 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 #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)
 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 #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)
 def setUp(self):
     Harness.setUp(self)
     for username in ['alice', 'bob', 'carl']:
         p = self.make_participant(username, elsewhere='twitter')
         setattr(self, username, p)
Example #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)
Example #21
0
 def setUp(self):
     Harness.setUp(self)
     self.alice = self.make_participant("alice")
     self.c_id = str(self.alice.create_community('test').id)
Example #22
0
 def setUp(self):
     Harness.setUp(self)
     make_history(self)
 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
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.bob = self.make_participant('bob')
Example #28
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.bar = self.make_participant('bar', is_admin=True)
Example #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='*****@*****.**')
Example #31
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 #32
0
 def setUp(self):
     Harness.setUp(self)
     for participant in ['alice', 'bob']:
         p = self.make_participant(participant, balance=100)
         setattr(self, participant, p)
Example #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)
 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")
Example #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')
Example #38
0
 def tearDown(self):
     Harness.tearDown(self)
     reset = Environment(CANONICAL_SCHEME=unicode,
                         CANONICAL_HOST=unicode,
                         environ=self.environ)
     wireup.canonical(reset)
 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 #41
0
 def setUp(self):
     Harness.setUp(self)
     self.stub = self.make_stub()  # Our protagonist
Example #42
0
 def tearDown(self):
     Harness.tearDown(self)
     reset = Environment(CANONICAL_SCHEME=unicode, CANONICAL_HOST=unicode, environ=self.environ)
     wireup.canonical(reset)
Example #43
0
 def setUp(self):
     Harness.setUp(self)
     make_history(self)
Example #44
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')
 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
Example #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')
Example #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')
Example #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')
 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 #50
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')
     self.bob = self.make_participant('bob')
Example #52
0
 def setUp(self):
     Harness.setUp(self)
     self.alice = self.make_participant("alice")
     self.c_id = str(self.alice.create_community('test').id)