#NEWLINE# def test_format_chronos_job_status_failure_and_then_success( ) : #NEWLINE# #INDENT# example_job = { #NEWLINE# #INDENT# 'lastError' : '2015-04-20T23:20:00.420Z' , #NEWLINE# 'lastSuccess' : '2015-04-21T23:20:00.420Z' , #NEWLINE# 'schedule' : 'foo' , #NEWLINE# #UNINDENT# } #NEWLINE# running_tasks = [ ] #NEWLINE# verbose = False #NEWLINE# actual = chronos_serviceinit . format_chronos_job_status ( example_job , running_tasks , verbose ) #NEWLINE# assert ( PaastaColors . green ( 'OK' ) in actual ) #NEWLINE# assert ( '(2015-04-21' in actual ) #NEWLINE# assert ( 'ago)' in actual )