def test_validate_src_fmt_configs(self):
    source_format = 'test_format'
    valid_configs = ['test_config_known', 'compatibility_val']
    backward_compatibility_configs = {'compatibility_val': 'val'}
    with pytest.raises(ValueError, match='test_config_unknown is not a valid src_fmt_configs for type test_format.'):
        src_fmt_configs = {'test_config_unknown': 'val'}
        _validate_src_fmt_configs(source_format, src_fmt_configs, valid_configs, backward_compatibility_configs)
    src_fmt_configs = {'test_config_known': 'val'}
    src_fmt_configs = _validate_src_fmt_configs(source_format, src_fmt_configs, valid_configs, backward_compatibility_configs)
    assert ('test_config_known' in src_fmt_configs), 'src_fmt_configs should contain al known src_fmt_configs'
    assert ('compatibility_val' in src_fmt_configs), '_validate_src_fmt_configs should add backward_compatibility config'
def test_validate_src_fmt_configs(self):
    source_format = 'test_format'
    valid_configs = ['test_config_known', 'compatibility_val']
    backward_compatibility_configs = {'compatibility_val': 'val'}
    with pytest.raises(ValueError, match='test_config_unknown is not a valid src_fmt_configs for type test_format.'):
        src_fmt_configs = {'test_config_unknown': 'val'}
        _validate_src_fmt_configs(source_format, src_fmt_configs, valid_configs, backward_compatibility_configs)
    src_fmt_configs = {'test_config_known': 'val'}
    src_fmt_configs = _validate_src_fmt_configs(source_format, src_fmt_configs, valid_configs, backward_compatibility_configs)
    assert ('test_config_known' in src_fmt_configs), 'src_fmt_configs should contain al known src_fmt_configs'
    assert ('compatibility_val' in src_fmt_configs), '_validate_src_fmt_configs should add backward_compatibility config'