diff options
| author | Scott Bahling <sbahling@suse.com> | 2020-01-26 00:53:21 +0100 |
|---|---|---|
| committer | Scott Bahling <sbahling@suse.com> | 2020-01-26 00:53:21 +0100 |
| commit | f728ee98064776a186a154e6c931ec3c87719b98 (patch) | |
| tree | 4860d6698be2fdb8d458a5066c737bcfb06c1379 /test/test_api.py | |
| parent | 488fe5d1b1eabbf971cfacc573401e53e88274f1 (diff) | |
| download | obsapi-f728ee98064776a186a154e6c931ec3c87719b98.tar.gz obsapi-f728ee98064776a186a154e6c931ec3c87719b98.tar.xz obsapi-f728ee98064776a186a154e6c931ec3c87719b98.zip | |
Add RepoFlags class and api.get_repo_flags method
Diffstat (limited to 'test/test_api.py')
| -rw-r--r-- | test/test_api.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/test_api.py b/test/test_api.py index 1830a3d..9f57364 100644 --- a/test/test_api.py +++ b/test/test_api.py @@ -101,6 +101,21 @@ def test_get_binary_fileinfo(): bfinfo = api.get_binary_fileinfo(prj, pkg, repo, arch, binary) +def check_get_repo_flags(flag_type, prj, pkg, expected): + repo_flags = api.get_repo_flags(flag_type, prj, pkg) + assert repo_flags.flag_type == flag_type + assert len(list(repo_flags.flags)) == expected + + +def test_get_repo_build_flags(): + xml = api.get_meta(prj) + check_get_repo_flags('build', prj, None, 0) + xml = api.get_meta(prj, pkg) + meta = etree.fromstring(xml) + build = meta.find('build') + check_get_repo_flags('build', prj, pkg, len(build)) + + def test_lock_project(): api.lock(prj) xml = api.get_meta(prj) |
