diff options
Diffstat (limited to 'test/test_obs_source_api.py')
| -rw-r--r-- | test/test_obs_source_api.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/test_obs_source_api.py b/test/test_obs_source_api.py index a170713..c8b7ec6 100644 --- a/test/test_obs_source_api.py +++ b/test/test_obs_source_api.py @@ -1,4 +1,5 @@ from obsapi.sourceapi import ObsSourceApi +import os prj = 'home:sbahling:obsapi:test' @@ -8,6 +9,16 @@ arch = 'x86_64' sourceapi = ObsSourceApi(apiurl='https://api.opensuse.org') +modpath = os.path.dirname(os.path.realpath(__file__)) + + +def test_source_put_meta(): + prj = 'home:sbahling:obsapi:t1' + 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 + def test_source_get_prj(): xml = sourceapi.get(prj) |
