'Check that timeout is set correctly
Test that the Jenkins object has the timeout set on it only when
provided via the config option.'

@mock.patch('jenkins_jobs.cli.subcommand.update.JenkinsManager')
def test_update_timeout_set(self, jenkins_mock):

    path = os.path.join(self.fixtures_path, 'cmd-002.yaml')
    config_file = os.path.join(self.fixtures_path, 'non-default-timeout.ini')
    args = ['--conf', config_file, 'update', path]
    jenkins_mock.return_value.update_jobs.return_value = ([], 0)
    jenkins_mock.return_value.update_views.return_value = ([], 0)
    self.execute_jenkins_jobs_with_args(args)
    jjb_config = jenkins_mock.call_args[0][0]
    self.assertEquals(jjb_config.jenkins['timeout'], 0.2)
