#NEWLINE# def test_can_be_created_with_a_voucher( self ) : #NEWLINE# #INDENT# voucher = create_voucher ( ) #NEWLINE# order = create_order ( number = '100002' ) #NEWLINE# discount = OrderDiscount . objects . create ( order = order , amount = D ( '10.00' ) , voucher_id = voucher . id ) #NEWLINE# self . assertEqual ( voucher . id , discount . voucher . id ) #NEWLINE# self . assertEqual ( voucher . code , discount . voucher_code )