From d552dd4883ad940247aa6f0bf605655357df3966 Mon Sep 17 00:00:00 2001 From: Scott Bahling Date: Wed, 4 Oct 2017 20:10:05 +0200 Subject: Move test project/package to build.opensuse.org --- test/test_api.py | 30 +++++++++++++++--------------- test/test_obs_build_api.py | 16 ++++++++-------- test/test_obs_source_api.py | 12 ++++++------ 3 files changed, 29 insertions(+), 29 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' diff --git a/test/test_obs_build_api.py b/test/test_obs_build_api.py index 08515ec..93d7577 100644 --- a/test/test_obs_build_api.py +++ b/test/test_obs_build_api.py @@ -1,11 +1,11 @@ from obsapi.buildapi import ObsBuildApi -prj = 'Test:obsapi' +prj = 'home:sbahling:obsapi:test' pkg = 'suse-hello-1.0' -repo = 'SLE_12' +repo = 'SLE_12_SP3' arch = 'x86_64' -buildapi = ObsBuildApi(apiurl='https://api.suse.com') +buildapi = ObsBuildApi(apiurl='https://api.opensuse.org') def test_build_get(): @@ -31,7 +31,7 @@ def test_build_get_arch(): def test_build_get_binary_list(): xml = buildapi.get(prj, repo, arch, pkg) assert '' in xml - assert ''.format(bname) in xml def test_build_get_binary_fileinfo_ext(): - bname = 'suse-hello-1.0-2.1.src.rpm' + bname = 'suse-hello-1.0-1.1.src.rpm' xml = buildapi.get(prj, repo, arch, pkg, bname, view='fileinfo_ext') assert ''.format(bname) in xml assert '' in xml - assert 'name="MaintenanceIdTemplate"' in xml + assert 'name="Screenshots"' in xml assert 'namespace="OBS"' in xml def test_source_get_pkg_attributes(): xml = sourceapi.get_attribute(prj, pkg) assert '' in xml - assert 'name="ScreenShots"' in xml + assert 'name="Screenshots"' in xml assert 'namespace="OBS"' in xml -- cgit v1.2.3