#NEWLINE# def test_consumes_correct_number_of_products_for_6_product_basket( self ) : #NEWLINE# #INDENT# basket = factories . create_basket ( empty = True ) #NEWLINE# add_products ( basket , [ ( D ( '1' ) , 3 ) , ( D ( '1' ) , 3 ) ] ) #NEWLINE# discount = self . offer . apply_benefit ( self ) #NEWLINE# self . assertTrue ( ( discount . discount > 0 ) ) #NEWLINE# self . assertEqual ( 3 , basket . num_items_with_discount ) #NEWLINE# self . assertEqual ( 3 , basket . num_items_without_discount ) #NEWLINE# discount = self . offer . apply_benefit ( basket ) #NEWLINE# self . assertTrue ( ( discount . discount > 0 ) ) #NEWLINE# self . assertEqual ( 6 , basket . num_items_with_discount )