def test_manage_edit_opt_with_defaults_do_not_change_anything(): pkg_cfg = {'hash': {}} pkg_cfg = add_option('base', pkg_cfg, {"pkg_fullname": 'toto', 'author_name': 'moi', 'author_email': '*****@*****.**'}) mem = dict(pkg_cfg['base']) with mock.patch('ltpkgbuilder.option_tools.loc_input', return_value=''): pkg_cfg = edit_option('base', pkg_cfg) assert mem == pkg_cfg['base']
def test_manage_edit_opt_raise_error_if_not_already_installed(): pkg_cfg = {} assert_raises(UserWarning, lambda: edit_option('base', pkg_cfg))