diff options
Diffstat (limited to 'test/test_api.py')
| -rw-r--r-- | test/test_api.py | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/test/test_api.py b/test/test_api.py index e32c66e..61ddae0 100644 --- a/test/test_api.py +++ b/test/test_api.py @@ -1,11 +1,11 @@ from obsapi import ObsApi from lxml import etree -api = ObsApi(apiurl='https://api.suse.com') +api = ObsApi(apiurl='https://api.opensuse.org') -prj = 'Test:obsapi' +prj = 'home:sbahling:obsapi:test' pkg = 'suse-hello-1.0' -repo = 'SLE_12' +repo = 'SLE_12_SP3' arch = 'x86_64' @@ -33,8 +33,8 @@ def test_ls_pkg(): def test_ls_binaries(): - files = ['_statistics', 'rpmlint.log', 'suse-hello-1.0-2.1.src.rpm', - 'suse-hello-kmp-default-1.0_k3.12.28_4-2.1.x86_64.rpm', + files = ['_statistics', 'rpmlint.log', 'suse-hello-1.0-1.1.src.rpm', + 'suse-hello-kmp-default-1.0_k4.4.73_5-1.1.x86_64.rpm', ] listing = api.ls(prj=prj, pkg=pkg, repo=repo, arch=arch) items = [i.filename for i in listing] @@ -43,8 +43,8 @@ def test_ls_binaries(): def test_binaries_ls(): - files = ['_statistics', 'rpmlint.log', 'suse-hello-1.0-2.1.src.rpm', - 'suse-hello-kmp-default-1.0_k3.12.28_4-2.1.x86_64.rpm', + files = ['_statistics', 'rpmlint.log', 'suse-hello-1.0-1.1.src.rpm', + 'suse-hello-kmp-default-1.0_k4.4.73_5-1.1.x86_64.rpm', ] listing = api.binaries_ls(prj=prj, pkg=pkg, repo=repo, arch=arch) items = [i.filename for i in listing] @@ -54,7 +54,7 @@ def test_binaries_ls(): def test_get_project_repos(): repos = api.get_project_repos(prj) - assert 'SLE_12' in repos + assert 'SLE_12_SP3' in repos def test_get_vendor(): @@ -64,21 +64,21 @@ def test_get_vendor(): 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.rev == '1' + assert sinfo.vrev == '1' assert sinfo.srcmd5 == '7054c47fb2ebde13fc62ee64d0a3b1bc' assert sinfo.verifymd5 == '7054c47fb2ebde13fc62ee64d0a3b1bc' def test_get_binary_fileinfo(): - binary = 'suse-hello-kmp-default-1.0_k3.12.28_4-2.1.x86_64.rpm' + binary = 'suse-hello-kmp-default-1.0_k4.4.73_5-1.1.x86_64.rpm' bfinfo = api.get_binary_fileinfo(prj, pkg, repo, arch, binary) assert bfinfo.filename == binary - assert bfinfo.size == '25869' - assert bfinfo.mtime == '1429457162' + assert bfinfo.size == '6709' + assert bfinfo.mtime == '1507137122' assert bfinfo.arch == 'x86_64' - assert bfinfo.version == '1.0_k3.12.28_4' - assert bfinfo.release == '2.1' + assert bfinfo.version == '1.0_k4.4.73_5' + assert bfinfo.release == '1.1' assert bfinfo.summary == 'Sample Kernel Module Package' assert bfinfo.description == 'This package contains the hello.ko module.' assert bfinfo.source == 'suse-hello' |
