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
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
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
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