#NEWLINE# def test_lastn( self ) : #NEWLINE# #INDENT# date_class = datetime . date #NEWLINE# with patch ( 'datetime.date' ) as date_patch : #NEWLINE# #INDENT# date_patch . today . return_value = self . first_performance #NEWLINE# date_patch . side_effect = ( lambda * args , **kwargs : date_class ( * args , ** kwargs ) ) #NEWLINE# ( start_date , end_date ) = get_daterange_start_end_dates ( 'lastn' , days = ( - 14 ) ) #NEWLINE# self . assertEqual ( start_date , datetime . date ( year = 1829 , month = 8 , day = 17 ) ) #NEWLINE# self . assertEqual ( end_date , self . first_performance )