def test_commandline(): ctx = context_wrap(COMMANDLINE) rpms = YumListInstalled(ctx) rpm = rpms.newest("jdk1.8.0_121") assert rpm is not None assert rpm.epoch == "2000" assert rpm.version == "1.8.0_121" assert rpm.release == "fcs" assert rpm.arch == "x86_64" assert rpm.repo == "commandline"
def test_multiple_stanza(): ctx = context_wrap(HEADER_FOOTER_JUNK) rpms = YumListInstalled(ctx) rpm = rpms.newest("GConf2") assert rpm is not None assert rpm.epoch == "0" assert rpm.version == "3.2.6" assert rpm.release == "8.el7" assert rpm.arch == "x86_64" assert rpm.repo == "rhel-7-server-rpms" rpm = rpms.newest("NetworkManager-config-server") assert rpm is not None assert rpm.epoch == "1" assert rpm.version == "1.8.0" assert rpm.release == "9.el7" assert rpm.arch == "noarch" assert rpm.repo == "installed"