#NEWLINE# def setUp( self ) : #NEWLINE# #INDENT# super ( TestContractedInvoices , self ) . setUp ( ) #NEWLINE# generator . delete_all_subscriptions ( ) #NEWLINE# self . subscription_length = self . min_subscription_length #NEWLINE# subscription_start_date = datetime . date ( 2016 , 2 , 23 ) #NEWLINE# subscription_end_date = add_months_to_date ( subscription_start_date , self . subscription_length ) #NEWLINE# self . subscription = generator . generate_domain_subscription ( self . account , subscription_start_date . domain , date_start = subscription_start_date , date_end = subscription_end_date , service_type = SubscriptionType . IMPLEMENTATION ) #NEWLINE# self . invoice_date = utils . months_from_date ( self . subscription . date_start , random . randint ( 2 , self . subscription_length ) )