Beispiel #1
0
 def test_getDescription_without_header(self):
     package = self.mocker.mock()
     loader = self.mocker.mock()
     loader.getHeader(package)
     self.mocker.replay()
     info = RPMHeaderPackageInfo(package, loader)
     self.assertEquals(info.getDescription(), u"")
 def test_getDescription_without_header(self):
     package = self.mocker.mock()
     loader = self.mocker.mock()
     loader.getHeader(package)
     self.mocker.replay()
     info = RPMHeaderPackageInfo(package, loader)
     self.assertEquals(info.getDescription(), u"")
Beispiel #3
0
 def test_getDescription_decodes_string(self):
     package = self.mocker.mock()
     loader = self.mocker.mock()
     loader.getHeader(package)
     self.mocker.result({rpm.RPMTAG_DESCRIPTION: "áéíóú"})
     self.mocker.replay()
     info = RPMHeaderPackageInfo(package, loader)
     self.assertEquals(info.getDescription(), u"áéíóú")
 def test_getDescription_decodes_string(self):
     package = self.mocker.mock()
     loader = self.mocker.mock()
     loader.getHeader(package)
     self.mocker.result({rpm.RPMTAG_DESCRIPTION: "áéíóú"})
     self.mocker.replay()
     info = RPMHeaderPackageInfo(package, loader)
     self.assertEquals(info.getDescription(), u"áéíóú")