#NEWLINE# def test_auto_timestamps( self ) : #NEWLINE# #INDENT# office = Office . objects . create ( state = 'MD' , name = 'House of Delegates' , district = '35B' , chamber = 'lower' ) #NEWLINE# contest = Contest ( result_type = 'certified' , election_type = 'general' , start_date = datetime . strptime ( '2012-11-06' , '%Y-%m-%d' ) , end_date = datetime . strptime ( '2012-11-06' , '%Y-%m-%d' ) , source = '20121106__md__general__state_legislative.csv' , state = 'MD' , election_id = 'md-2012-11-06-general' , office = office ) #NEWLINE# self . assertIsNotNone ( contest . created ) #NEWLINE# self . assertIsNotNone ( self . updated ) #NEWLINE# self . assert_times_almost_equal ( contest . created , contest . updated ) #NEWLINE# updated = contest . updated #NEWLINE# contest . save ( ) #NEWLINE# self . assertGreater ( contest . updated , updated )