#NEWLINE# def test_withdrawals_take_fee_out_of_balance( self ) : #NEWLINE# #INDENT# self . make_participant ( 'alice' , claimed_time = utcnow ( ) , is_admin = True ) #NEWLINE# self . bob = self . make_participant ( 'bob' , claimed_time = utcnow ( ) , balance = 20 ) #NEWLINE# self . bob = self . record_an_exchange ( { #NEWLINE# #INDENT# 'amount' : '-7' , #NEWLINE# 'fee' : '1.13' , #NEWLINE# #UNINDENT# } , False ) #NEWLINE# SQL = "SELECT balance FROM participants WHERE username='bob'" #NEWLINE# assert ( self . db . one ( SQL ) == Decimal ( '11.87' ) )