#NEWLINE# def test_success_records_exchange( self ) : #NEWLINE# #INDENT# self . record_an_exchange ( { #NEWLINE# #INDENT# 'amount' : '10' , #NEWLINE# 'fee' : '0.50' , #NEWLINE# #UNINDENT# } ) #NEWLINE# expected = { #NEWLINE# #INDENT# 'amount' : Decimal ( '10.00' ) , #NEWLINE# 'fee' : Decimal ( '0.50' ) , #NEWLINE# 'participant' : 'bob' , #NEWLINE# 'recorder' : 'alice' , #NEWLINE# 'note' : 'noted' , #NEWLINE# 'route' : ExchangeRoute . from_network ( self . bob , 'paypal' ) . id , #NEWLINE# #UNINDENT# } #NEWLINE# SQL = 'SELECT amount, fee, participant, recorder, note, route FROM exchanges' #NEWLINE# actual = self . db . one ( self , back_as = dict ) #NEWLINE# assert ( actual == expected )