def test_build_options(self): result = Host.build_options(output_dir='/test/dir', log_group='test_log_group', metrics='test_metrics') self.assertEqual('test_log_group', result['log_group']) self.assertEqual('/test/dir', result['output_dir']) self.assertEqual('test_metrics', result['metrics'])
def test_build_options(self): with patch.dict(os.environ, { constants.ENV_CONTAINER_OPTION_OUTPUT_DIR: '/test/dir', constants.ENV_CONTAINER_OPTION_LOG_GROUP: 'test_log_group', constants.ENV_CONTAINER_OPTION_METRICS: 'test_metrics' }, clear=False): result = Host.build_options() self.assertEqual('test_log_group', result['log_group']) self.assertEqual('/test/dir', result['output_dir']) self.assertEqual('test_metrics', result['metrics'])
def test_build_options_empty(self, _): result = Host.build_options() self.assertEqual(None, result['log_group']) self.assertEqual('test_path', result['output_dir']) self.assertEqual(None, result['metrics'])