Example #1
0
 def test_save_config_dumps_to_file(self):
     mock_job = self._create_mock_job()
     return_object = self.MockContextManager()
     self.mock_builtins_open.return_value = return_object
     job_bundler = JobBundler('fake_name', {}, mock_job, None)
     job_bundler._save_config()
     self.mock_yaml_dump.assert_called_with({'job_name': 'fake_name'}, return_object)
Example #2
0
 def test_save_config_opens_file(self):
     mock_job = self._create_mock_job()
     job_bundler = JobBundler('fake_name', {}, mock_job, None)
     job_bundler._save_config()
     self.mock_builtins_open.assert_called_with(self.temp_directory + '/fake_name.config.yaml', 'w+')