#NEWLINE# def test_start_work( self ) : #NEWLINE# #INDENT# r = self . client . get ( reverse ( 'work' ) ) #NEWLINE# eq_ ( r . status_code , 200 ) #NEWLINE# assert r . context [ 'worker_id' ] #NEWLINE# worker = Worker . objects . get ( pk = r . context [ 'worker_id' ] ) #NEWLINE# eq_ ( worker . created . timetuple ( ) [ 0 : 3 ] , datetime . now ( ) . timetuple ( ) [ 0 : 3 ] ) #NEWLINE# eq_ ( self . last_heartbeat , None ) #NEWLINE# eq_ ( worker . ip_address , '127.0.0.1' )