diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/test_api.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test/test_api.py b/test/test_api.py index 054a7df..e32c66e 100644 --- a/test/test_api.py +++ b/test/test_api.py @@ -84,3 +84,27 @@ def test_get_binary_fileinfo(): assert bfinfo.source == 'suse-hello' binary = '_statistics' bfinfo = api.get_binary_fileinfo(prj, pkg, repo, arch, binary) + + +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 + assert lock.find('enable') is not None + + +def test_unlock_project(): + api.unlock(prj) + meta = etree.fromstring(api.get_meta(prj)) + lock = meta.find('lock') + assert lock is None + + +def test_project_locked(): + api.lock(prj) + assert api.locked(prj) is True + api.unlock(prj) + assert api.locked(prj) is False |
