diff options
| author | Scott Bahling <sbahling@suse.de> | 2017-11-01 11:44:12 +0100 |
|---|---|---|
| committer | Scott Bahling <sbahling@suse.de> | 2017-11-01 12:05:39 +0100 |
| commit | d8640ac161de82ff0e1f925d0c39f48067d4479a (patch) | |
| tree | ee608de968d6e07cb6992b1ea031f438db143a40 /test/test_obs_source_api.py | |
| parent | d552dd4883ad940247aa6f0bf605655357df3966 (diff) | |
| download | obsapi-d8640ac161de82ff0e1f925d0c39f48067d4479a.tar.gz obsapi-d8640ac161de82ff0e1f925d0c39f48067d4479a.tar.xz obsapi-d8640ac161de82ff0e1f925d0c39f48067d4479a.zip | |
Add test for sourceapi.put_meta
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) |
