Esempio n. 1
0
 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)
Esempio n. 2
0
 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)
Esempio n. 3
0
 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)
Esempio n. 4
0
 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)
Esempio n. 5
0
 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)
Esempio n. 6
0
 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)