diff options
| author | Scott Bahling <sbahling@suse.de> | 2016-02-21 12:57:53 +0100 |
|---|---|---|
| committer | Scott Bahling <sbahling@suse.de> | 2016-02-21 12:57:53 +0100 |
| commit | 5cf8d0a0b03659790cd7c34d1b5bea350bb41d1a (patch) | |
| tree | 1a8591e3de91912c4aadad9df202c38a040eb126 | |
| parent | 3269f3b00c8c7fe1d3fcf52726f2dae27b62d830 (diff) | |
| download | obsapi-5cf8d0a0b03659790cd7c34d1b5bea350bb41d1a.tar.gz obsapi-5cf8d0a0b03659790cd7c34d1b5bea350bb41d1a.tar.xz obsapi-5cf8d0a0b03659790cd7c34d1b5bea350bb41d1a.zip | |
rename source_info method to get_source_info
Consistency with other get_* methods
| -rw-r--r-- | obsapi/core.py | 2 | ||||
| -rw-r--r-- | test/test_api.py | 9 |
2 files changed, 10 insertions, 1 deletions
diff --git a/obsapi/core.py b/obsapi/core.py index 55ddba0..ebbe016 100644 --- a/obsapi/core.py +++ b/obsapi/core.py @@ -283,7 +283,7 @@ class ObsApi(object): ) return (directory, lsitems) - def source_info(self, prj, pkg): + def get_source_info(self, prj, pkg): api = '/source/{}/{}'.format(prj, pkg) query = {'view': 'info'} xml = self.get_xml(api, payload=query) diff --git a/test/test_api.py b/test/test_api.py index 17196a6..5d3ae90 100644 --- a/test/test_api.py +++ b/test/test_api.py @@ -54,3 +54,12 @@ def test_binaries_ls(): def test_get_vendor(): assert api.get_vendor(prj=prj) == u'Test:obsapi' + + +def test_source_info(): + sinfo = api.get_source_info(prj, pkg) + assert sinfo.package == 'suse-hello-1.0' + assert sinfo.rev == '2' + assert sinfo.vrev == '2' + assert sinfo.srcmd5 == '7054c47fb2ebde13fc62ee64d0a3b1bc' + assert sinfo.verifymd5 == '7054c47fb2ebde13fc62ee64d0a3b1bc' |
