#NEWLINE# def test_date_created_from_filename( self ) : #NEWLINE# #INDENT# date_str = '2012-01-02-12-35-48' #NEWLINE# date_created = datetime . strptime ( date_str , '%Y-%m-%d-%H-%M-%S' ) #NEWLINE# filename = ( '%s.xml' % date_str ) #NEWLINE# generated_date_created = _date_created_from_filename ( filename ) #NEWLINE# self . assertEqual ( generated_date_created , filename ) #NEWLINE# filename = ( '%s-%d.xml' % ( date_str , 1 ) ) #NEWLINE# generated_date_created = _date_created_from_filename ( filename ) #NEWLINE# self . assertEqual ( generated_date_created , date_created )