diff options
| author | Scott Bahling <sbahling@suse.de> | 2018-08-24 19:02:31 +0200 |
|---|---|---|
| committer | Scott Bahling <sbahling@suse.de> | 2018-08-24 19:02:31 +0200 |
| commit | 92f28f33d59a397c820daf1b899bdd50724dac02 (patch) | |
| tree | b5597935cf71eb2bc903280c264f2dcf5957471b /test/test_obs_person_api.py | |
| parent | 802a888933274702247866e1f7204581f0d860ea (diff) | |
| download | obsapi-92f28f33d59a397c820daf1b899bdd50724dac02.tar.gz obsapi-92f28f33d59a397c820daf1b899bdd50724dac02.tar.xz obsapi-92f28f33d59a397c820daf1b899bdd50724dac02.zip | |
Add initial person api
Diffstat (limited to 'test/test_obs_person_api.py')
| -rw-r--r-- | test/test_obs_person_api.py | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/test_obs_person_api.py b/test/test_obs_person_api.py new file mode 100644 index 0000000..5e8e1f3 --- /dev/null +++ b/test/test_obs_person_api.py @@ -0,0 +1,25 @@ +from obsapi.personapi import ObsPersonApi + +prj = 'home:sbahling:obsapi:test' +pkg = 'suse-hello-1.0' +repo = 'SLE_12_SP3' +arch = 'x86_64' + +personapi = ObsPersonApi(apiurl='https://api.opensuse.org') + + +def test_person_get(): + xml = personapi.get() + assert '<directory' in xml + assert '<entry name="Admin"/>' in xml + + +def test_person_get_user(): + user = 'Admin' + xml = personapi.get(user) + assert '<person>' in xml + assert '<email' in xml + assert '<realname' in xml + assert '<state' in xml + assert '<globalrole' in xml + assert '<ignore_auth_service' in xml |
