#NEWLINE# def test_format_chronos_job_dict_invalid_param( self ) : #NEWLINE# #INDENT# fake_service = 'test_service' #NEWLINE# fake_job_name = 'test_job' #NEWLINE# fake_command = 'echo foo >> /tmp/test_service_log' #NEWLINE# fake_schedule = 'fake_bad_schedule' #NEWLINE# invalid_config = chronos_tools . ChronosJobConfig ( service = fake_service , cluster = '' , instance = fake_job_name , config_dict = { #NEWLINE# #INDENT# 'cmd' : fake_command , #NEWLINE# 'schedule' : fake_schedule , #NEWLINE# 'epsilon' : 'PT60S' , #NEWLINE# #UNINDENT# } , branch_dict = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# with raises ( chronos_tools . InvalidChronosConfigError ) as exc : #NEWLINE# #INDENT# invalid_config . format_chronos_job_dict ( docker_url = '' , docker_volumes = [ ] , dockercfg_location = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# #UNINDENT# assert ( ( 'The specified schedule "%s" is invalid' % fake_schedule ) in exc . value )