summaryrefslogtreecommitdiff
path: root/test/test_obs_person_api.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_obs_person_api.py')
-rw-r--r--test/test_obs_person_api.py25
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