diff options
| author | Scott Bahling <sbahling@suse.com> | 2020-01-21 12:49:15 +0100 |
|---|---|---|
| committer | Scott Bahling <sbahling@suse.com> | 2020-01-21 12:49:15 +0100 |
| commit | 51812adc8e9dcadaf7b57d866c41f43bc05fefd2 (patch) | |
| tree | 115b3cc3b8d5e0bb9bed661a06e8a6df3c240d7a | |
| parent | aab8651b3caf0d06446e750378ef227d1cdbaa35 (diff) | |
| download | obsapi-51812adc8e9dcadaf7b57d866c41f43bc05fefd2.tar.gz obsapi-51812adc8e9dcadaf7b57d866c41f43bc05fefd2.tar.xz obsapi-51812adc8e9dcadaf7b57d866c41f43bc05fefd2.zip | |
Fix some python3 incompatibilities
| -rw-r--r-- | test/test_api.py | 3 | ||||
| -rw-r--r-- | test/test_obs_build_api.py | 8 | ||||
| -rw-r--r-- | 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 '<buildstatistics>' in binary + assert '<buildstatistics>' 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 '<fileinfo filename="{}">'.format(bname) in xml + assert '<fileinfo filename="{}">'.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 '<fileinfo filename="{}">'.format(bname) in xml - assert '<requires_ext' in xml + assert '<fileinfo filename="{}">'.format(bname) in str(xml) + assert '<requires_ext' in str(xml) def test_build_get_builddepinfo(): diff --git a/test/test_obs_source_api.py b/test/test_obs_source_api.py index c8b7ec6..47df73f 100644 --- a/test/test_obs_source_api.py +++ b/test/test_obs_source_api.py @@ -17,7 +17,7 @@ def test_source_put_meta(): with open(os.path.join(modpath, 'obsapi_test_prj_meta.xml')) as f: xml = f.read().replace('__PRJ__', prj) response = sourceapi.put_meta(prj, xml) - assert '<status code="ok">' in response.content + assert '<status code="ok">' in str(response.content) def test_source_get_prj(): |
