def test_pkg_id_str_03(self): pkg = cr.package_from_rpm(fixtures.PACKAGE_ARCHER) idstr = pkg_id_str(pkg) self.assertEqual(idstr, "4e0b775220c67f0f2c1fd2177e626b9c863a098130224ff09778ede25cea9a9e") pkg.location_href = os.path.basename(fixtures.PACKAGE_ARCHER) idstr = pkg_id_str(pkg) self.assertEqual(idstr, "4e0b775220c67f0f2c1fd2177e626b9c863a098130224ff09778ede25cea9a9eArcher-3.4.5-6.x86_64.rpm") pkg.location_base = "https://foobar/" idstr = pkg_id_str(pkg) self.assertEqual(idstr, "4e0b775220c67f0f2c1fd2177e626b9c863a098130224ff09778ede25cea9a9eArcher-3.4.5-6.x86_64.rpmhttps://foobar/")
def test_pkg_id_str_02(self): pkg = cr.package_from_rpm(fixtures.PACKAGE_RIMMER) idstr = pkg_id_str(pkg) self.assertEqual(idstr, "60dee92d523e8390eb7430fca8ffce461b5b2ad4eb19878cde5c16d72955ee49")
def test_pkg_id_str_01(self): pkg = cr.Package() idstr = pkg_id_str(pkg) self.assertEqual(idstr, "")