From 51812adc8e9dcadaf7b57d866c41f43bc05fefd2 Mon Sep 17 00:00:00 2001 From: Scott Bahling Date: Tue, 21 Jan 2020 12:49:15 +0100 Subject: Fix some python3 incompatibilities --- test/test_api.py | 3 --- test/test_obs_build_api.py | 8 ++++---- test/test_obs_source_api.py | 2 +- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/test/test_api.py b/test/test_api.py index 6992492..45ad05b 100644 --- a/test/test_api.py +++ b/test/test_api.py @@ -89,7 +89,6 @@ def test_get_binary_fileinfo(): def test_lock_project(): api.lock(prj) xml = api.get_meta(prj) - print(xml) meta = etree.fromstring(xml) lock = meta.find('lock') assert lock is not None @@ -112,13 +111,11 @@ def test_project_locked(): def test_get_users(): users = api.get_users(prj) - print users assert len(users) > 0 def test_get_groups(): groups = api.get_groups(prj) - print groups assert groups == [] diff --git a/test/test_obs_build_api.py b/test/test_obs_build_api.py index 93d7577..95b8fa3 100644 --- a/test/test_obs_build_api.py +++ b/test/test_obs_build_api.py @@ -37,20 +37,20 @@ def test_build_get_binary_list(): def test_build_get_binary(): bname = '_statistics' binary = buildapi.get(prj, repo, arch, pkg, bname) - assert '' in binary + assert '' in str(binary) def test_build_get_binary_fileinfo(): bname = 'suse-hello-1.0-1.1.src.rpm' xml = buildapi.get(prj, repo, arch, pkg, bname, view='fileinfo') - assert ''.format(bname) in xml + assert ''.format(bname) in str(xml) def test_build_get_binary_fileinfo_ext(): 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 ''.format(bname) in str(xml) + assert '' in response.content + assert '' in str(response.content) def test_source_get_prj(): -- cgit v1.2.3