def test_invalid_nevra(self): nevra = "jay-3-fc24" with self.assertRaises(ValueError) as e: rpm.nevra(nevra) self.assertEquals( e.exception.message, _("failed to parse nevra '%s' not a valid nevra") % nevra)
def test_nevra_to_nevr(self): """Test parsing NEVRA tuple to NEVR tuple.""" nevra = rpm.nevra("yum-3.4.3-8.fc16.x86_64") nevr = rpm.nevr("yum-3.4.3-8.fc16") self.assertEquals(rpm.nevra_to_nevr(*nevra), nevr)
def test_correct_nevra_parsing(self): """Test parsing NEVRA.""" excepted_nevra = rpm.nevr("yum-3.4.3-8.fc16") + ("x86_64", ) self.assertEquals(rpm.nevra("yum-3.4.3-8.fc16.x86_64"), excepted_nevra)
def test_invalid_nevra(self): nevra = "jay-3-fc24" with self.assertRaises(ValueError) as e: rpm.nevra(nevra) self.assertEquals(e.exception.message, _("failed to parse nevra '%s' not a valid nevra") % nevra)
def test_correct_nevra_parsing(self): """Test parsing NEVRA.""" excepted_nevra = rpm.nevr("yum-3.4.3-8.fc16") + ("x86_64",) self.assertEquals(rpm.nevra("yum-3.4.3-8.fc16.x86_64"), excepted_nevra)