#NEWLINE# def test_basket_line_discount( self ) : #NEWLINE# #INDENT# 'A discount should be properly applied to the basket line' #NEWLINE# self . test_basket_discount ( ) #NEWLINE# self . response = self . get ( self . response [ 'lines' ] ) #NEWLINE# self . assertEqual ( len ( line0 . response . body ) , 1 ) #NEWLINE# line0 = self . response . body [ 0 ] #NEWLINE# self . assertEqual ( line0 [ 'product' ] , 'http://testserver/api/products/1/' ) #NEWLINE# self . assertEqual ( line0 [ 'quantity' ] , 5 ) #NEWLINE# self . assertEqual ( line0 [ 'price_excl_tax' ] , '42.00' ) #NEWLINE# self . assertEqual ( line0 [ 'price_incl_tax' ] , '42.00' ) #NEWLINE# self . assertEqual ( line0 [ 'price_excl_tax_excl_discounts' ] , '50.00' ) #NEWLINE# self . assertEqual ( line0 [ 'price_incl_tax_excl_discounts' ] , '50.00' )