示例#1
0
def test_manage_update_pkg_do_not_change_installed_options():
    ver = get_local_version()
    ver.version = (ver.version[0], ver.version[1] + 1, ver.version[2])

    pkg_cfg = {'base': dict(pkg_fullname='toto',
                            pkgname='toto',
                            namespace=None,
                            author_name='moi',
                            author_email='*****@*****.**')}

    mem = dict(pkg_cfg['base'])

    with mock.patch("ltpkgbuilder.manage.get_github_version",
                    return_value=ver):
        with mock.patch('ltpkgbuilder.option_tools.loc_input',
                        return_value=''):
            pkg_cfg = update_pkg(pkg_cfg)
            assert len(pkg_cfg) == 1
            assert pkg_cfg['base'] == mem
示例#2
0
def test_manage_update_pkg_do_nothing_if_up_to_date():
    pkg_cfg = update_pkg({})
    assert len(pkg_cfg) == 0