Esempio n. 1
0
 def make_transfer(self, tipper, tippee, amount, context='tip', team=None, status='succeeded'):
     t_id = self.db.one("""
         INSERT INTO transfers
                     (tipper, tippee, amount, context, team, status)
              VALUES (%s, %s, %s, %s, %s, 'pre')
           RETURNING id
     """, (tipper, tippee, amount, context, team))
     _record_transfer_result(self.db, t_id, status)
     return t_id
Esempio n. 2
0
 def make_transfer(self, tipper, tippee, amount, context='tip', team=None, status='succeeded'):
     t_id = self.db.one("""
         INSERT INTO transfers
                     (tipper, tippee, amount, context, team, status)
              VALUES (%s, %s, %s, %s, %s, 'pre')
           RETURNING id
     """, (tipper, tippee, amount, context, team))
     _record_transfer_result(self.db, t_id, status)
     return t_id
Esempio n. 3
0
def fake_transfer(db, tipper, tippee, amount, timestamp):
    status = 'succeeded'
    t = _fake_thing(
        db,
        "transfers",
        timestamp=timestamp,
        tipper=tipper.id,
        tippee=tippee.id,
        amount=amount,
        context='tip',
        status=status,
    )
    _record_transfer_result(db, t.id, status)
    return t
Esempio n. 4
0
def fake_transfer(db, tipper, tippee, amount, timestamp):
    status = 'succeeded'
    t = _fake_thing(
        db,
        "transfers",
        timestamp=timestamp,
        tipper=tipper.id,
        tippee=tippee.id,
        amount=amount,
        context='tip',
        status=status,
    )
    _record_transfer_result(db, t.id, status)
    return t