summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/test_obs_build_api.py16
1 files changed, 12 insertions, 4 deletions
diff --git a/test/test_obs_build_api.py b/test/test_obs_build_api.py
index 95b8fa3..39b6868 100644
--- a/test/test_obs_build_api.py
+++ b/test/test_obs_build_api.py
@@ -1,4 +1,5 @@
from obsapi.buildapi import ObsBuildApi
+from lxml import etree
prj = 'home:sbahling:obsapi:test'
pkg = 'suse-hello-1.0'
@@ -115,10 +116,17 @@ def test_build_get_log():
def test_build_get_repository():
xml = buildapi.get_repository(prj, repo, arch)
- assert '<binarylist>' in xml
+ assert '<binarylist' in xml
def test_build_get_repository_binary():
- bname = 'suse-hello-kmp-default.rpm'
- binary = buildapi.get_repository(prj, repo, arch, bname)
- assert len(binary) == 6709
+ xml = buildapi.get_repository(prj, repo, arch)
+ root = etree.fromstring(xml)
+ entries = root.findall('binary')
+ assert entries is not None
+ for entry in entries:
+ bname = entry.get('filename')
+ size = entry.get('size')
+ binary = buildapi.get_repository(prj, repo, arch, bname)
+ assert binary is not None
+ assert len(binary) == int(size)