#NEWLINE# def event( self , type , quantity = None ) : #NEWLINE# #INDENT# '\n        Creates a shipping event for the test line\n        ' #NEWLINE# event = ShippingEvent . objects . create ( order = type . order , event_type = type ) #NEWLINE# if ( quantity is None ) : #NEWLINE# #INDENT# quantity = self . line . quantity #NEWLINE# #UNINDENT# ShippingEventQuantity . objects . create ( event = event , line = self . line , quantity = quantity )