aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-07-14 03:05:50 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-07-14 03:13:56 +0100
commit95dc39cb76e5652aabfba76707840330274efd2e (patch)
tree753d5c3ff0b788115db0e2485064f6393275ae39
parent341b41e24bee6e73f874f61085036d111384fd06 (diff)
downloadpaludis-95dc39cb76e5652aabfba76707840330274efd2e.tar.gz
paludis-95dc39cb76e5652aabfba76707840330274efd2e.tar.xz
(python) Update python for previous (continued)
-rwxr-xr-xpython/metadata_key_TEST.py4
-rw-r--r--python/package_id.cc11
-rwxr-xr-xpython/package_id_TEST.py10
3 files changed, 8 insertions, 17 deletions
diff --git a/python/metadata_key_TEST.py b/python/metadata_key_TEST.py
index a7a86af..62bc388 100755
--- a/python/metadata_key_TEST.py
+++ b/python/metadata_key_TEST.py
@@ -46,8 +46,8 @@ class TestCase_01_MetadataKeys(unittest.TestCase):
self.assert_(isinstance(self.ipid.find_metadata("INSTALLED_TIME"), MetadataTimeKey))
def test_03_repository(self):
- self.assertEquals(self.pid.find_metadata("REPOSITORY"), None)
- self.assert_(isinstance(self.ipid.find_metadata("REPOSITORY"), MetadataStringKey))
+ self.assertEquals(self.pid.find_metadata("REPOSITORIES"), None)
+ self.assert_(isinstance(self.ipid.find_metadata("REPOSITORIES"), MetadataStringIterableKey))
def test_04_keywords(self):
self.assert_(isinstance(self.pid.find_metadata("KEYWORDS"), MetadataKeywordNameIterableKey))
diff --git a/python/package_id.cc b/python/package_id.cc
index 29ddbb6..f55aa02 100644
--- a/python/package_id.cc
+++ b/python/package_id.cc
@@ -197,14 +197,9 @@ void expose_package_id()
"using dl_reinstall_scm_daily or dl_reinstall_scm_weekly."
)
- .def("source_origin_key", &PackageID::source_origin_key,
- "The source_origin_key, if not None, contains a string describing\n"
- "the source repository whence a package originated."
- )
-
- .def("binary_origin_key", &PackageID::binary_origin_key,
- "The binary_origin_key, if not None, contains a string describing\n"
- "the binary repository whence a package originated."
+ .def("from_repositories_key", &PackageID::from_repositories_key,
+ "The from_repositories_key, if not None, contains strings describing\n"
+ "the repositories whence a package originated."
)
.def("fs_location_key", &PackageID::fs_location_key,
diff --git a/python/package_id_TEST.py b/python/package_id_TEST.py
index 1dade02..16f73c9 100755
--- a/python/package_id_TEST.py
+++ b/python/package_id_TEST.py
@@ -171,13 +171,9 @@ class TestCase_01_PackageID(unittest.TestCase):
self.assertEquals(self.pid.installed_time_key(), None)
self.assert_(isinstance(self.ipid.installed_time_key(), MetadataTimeKey))
- def test_28_source_origin_key(self):
- self.assertEquals(self.pid.source_origin_key(), None)
- self.assertEquals(self.ipid.source_origin_key().value(), "origin_test")
-
- def test_29_binary_origin_key(self):
- self.assertEquals(self.pid.binary_origin_key(), None)
- self.assertEquals(self.ipid.binary_origin_key(), None)
+ def test_28_from_repositories_key(self):
+ self.assertEquals(self.pid.from_repositories_key(), None)
+ self.assertEquals(iter(self.ipid.from_repositories_key().value()).next(), "origin_test")
def test_30_fs_location_key(self):
self.assert_(isinstance(self.ipid.fs_location_key(), MetadataFSEntryKey))