def test_max_min_kernel(): rpms = InstalledRpms(context_wrap(RPMS_MULTIPLE_KERNEL)) assert rpms.get_min('kernel').package == 'kernel-3.10.0-327.el7' assert rpms.get_max('kernel').package == 'kernel-3.10.0-327.36.1.el7' assert rpms.get_min( 'kernel-devel').package == 'kernel-devel-3.10.0-327.el7' assert rpms.get_max( 'kernel-devel').package == 'kernel-devel-3.10.0-327.36.1.el7'
def test_max_min_not_found(): rpms = InstalledRpms(context_wrap(RPMS_MULTIPLE_KERNEL)) assert rpms.get_min('abc') is None assert rpms.get_max('abc') is None
def test_max_min(): rpms = InstalledRpms(context_wrap(RPMS_MULTIPLE)) assert rpms.get_min('yum').package == 'yum-3.4.2-132.el7' assert rpms.get_max('yum').package == 'yum-3.4.3-132.el7'