[unittest] add a new test to the suite, this will test PROVIDE metadata
This commit is contained in:
@@ -51,6 +51,10 @@ def get_test_entropy_package4():
|
||||
test_pkg = "x11-base:xorg-server-1.5.3-r6~1.tbz2"
|
||||
return get_test_generic_package(test_pkg)
|
||||
|
||||
def get_test_entropy_package_provide():
|
||||
test_pkg = "mail-mta:ssmtp-2.62-r7~0.tbz2"
|
||||
return get_test_generic_package(test_pkg)
|
||||
|
||||
def get_test_xpak_empty_package():
|
||||
test_pkg = "aspell-es-0.50.2.tbz2"
|
||||
return get_test_generic_package(test_pkg)
|
||||
|
||||
@@ -161,6 +161,13 @@ class EntropyRepositoryTest(unittest.TestCase):
|
||||
system_pkgs = self.test_db.retrieveSystemPackages()
|
||||
self.assertEqual(system_pkgs, set([idpackage]))
|
||||
|
||||
def test_db_insert_compare_match_provide(self):
|
||||
test_pkg = _misc.get_test_entropy_package_provide()
|
||||
data = self.Spm.extract_package_metadata(test_pkg)
|
||||
idpackage, rev, new_data = self.test_db.handlePackage(data)
|
||||
db_data = self.test_db.getPackageData(idpackage)
|
||||
self.assertEqual(new_data, db_data)
|
||||
|
||||
def test_db_insert_compare_match(self):
|
||||
|
||||
# insert/compare
|
||||
|
||||
BIN
libraries/tests/packages/mail-mta:ssmtp-2.62-r7~0.tbz2
Normal file
BIN
libraries/tests/packages/mail-mta:ssmtp-2.62-r7~0.tbz2
Normal file
Binary file not shown.
Reference in New Issue
Block a user