#NEWLINE# def test_sync_from_stripe_data_no_plan( self ) : #NEWLINE# #INDENT# FAKE_INVOICE_NO_PLAN = deepcopy ( FAKE_INVOICE ) #NEWLINE# FAKE_INVOICE_NO_PLAN [ 'id' ] = 'in_yyyyyyyyyyyyyyy' #NEWLINE# FAKE_INVOICE_NO_PLAN [ 'subscription' ] = 'sub_yyyyyyyyyyyyyyy' #NEWLINE# FAKE_INVOICE_NO_PLAN [ 'lines' ] [ 'data' ] [ 0 ] [ 'id' ] = 'sub_yyyyyyyyyyyyyyy' #NEWLINE# FAKE_INVOICE_NO_PLAN [ 'lines' ] [ 'data' ] [ 0 ] [ 'plan' ] = None #NEWLINE# invoice = Invoice . sync_from_stripe_data ( FAKE_INVOICE_NO_PLAN ) #NEWLINE# self . assertEqual ( 1 , invoice . items . count ( ) ) #NEWLINE# invoice_item = invoice . items . all ( ) [ 0 ] #NEWLINE# self . assertEqual ( '' , invoice_item . plan )