def test_get_app_config_invalid(app_yaml): config_file = 'some_config_file' base_image = 'some_image_name' source_dir = 'some_source_dir' raw_app_config = yaml.safe_load(app_yaml) with pytest.raises(ValueError): gen_dockerfile.get_app_config(raw_app_config, base_image, config_file, source_dir)
def test_get_app_config_invalid(app_yaml): config_file = 'some_config_file' base_image = 'some_image_name' source_dir = 'some_source_dir' raw_app_config = yaml.safe_load(app_yaml) with pytest.raises(ValueError): gen_dockerfile.get_app_config( raw_app_config, base_image, config_file, source_dir)
def test_get_app_config_valid(app_yaml, expected): config_file = 'some_config_file' base_image = 'some_image_name' source_dir = 'some_source_dir' raw_app_config = yaml.safe_load(app_yaml) actual = gen_dockerfile.get_app_config(raw_app_config, base_image, config_file, source_dir) for key, value in expected.items(): assert getattr(actual, key) == value
def test_get_app_config_valid(app_yaml, expected): config_file = 'some_config_file' base_image = 'some_image_name' source_dir = 'some_source_dir' raw_app_config = yaml.safe_load(app_yaml) actual = gen_dockerfile.get_app_config( raw_app_config, base_image, config_file, source_dir) for key, value in expected.items(): assert getattr(actual, key) == value