new and improved test
This commit is contained in:
parent
702b8eaed6
commit
024a63b725
|
@ -1,3 +1,5 @@
|
|||
import json
|
||||
|
||||
from tests.base_test import BaseTest
|
||||
|
||||
|
||||
|
@ -8,8 +10,16 @@ class TestLdapApi(BaseTest):
|
|||
Test to make sure that LDAP api point returns a 200 code
|
||||
"""
|
||||
self.load_example_data()
|
||||
rv = self.app.get('/v1.0/ldap?query=atp',
|
||||
rv = self.app.get('/v1.0/ldap?query=dhf',
|
||||
follow_redirects=True,
|
||||
content_type="application/json", headers=self.logged_in_headers())
|
||||
self.assertTrue(rv.status_code == 200)
|
||||
user_uid = "dhf8r"
|
||||
data = json.loads(rv.data)
|
||||
self.assertEqual(data[0]['uid'], user_uid)
|
||||
self.assertEqual(data[0]['display_name'], 'Dan Funk')
|
||||
self.assertEqual(data[0]['given_name'], 'Dan')
|
||||
self.assertEqual(data[0]['affiliation'], 'faculty')
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue