Added a test with uppercase UID
Modified the script test to expect an empty dictionary now, instead of raising an error
This commit is contained in:
parent
8df1145471
commit
6b51fc7c06
|
@ -45,8 +45,8 @@ class TestLdapLookupScript(BaseTest):
|
|||
}
|
||||
|
||||
script = Ldap()
|
||||
with(self.assertRaises(ApiError)):
|
||||
user_details = script.do_task(task, workflow.study_id, workflow.id, "PIComputingID")
|
||||
user_details = script.do_task(task, workflow.study_id, workflow.id, "PIComputingID")
|
||||
self.assertEqual({}, user_details)
|
||||
|
||||
def test_get_current_user_details(self):
|
||||
self.load_example_data()
|
||||
|
|
|
@ -31,3 +31,8 @@ class TestLdapService(BaseTest):
|
|||
self.assertFalse(True, "An API error should be raised.")
|
||||
except ApiError as ae:
|
||||
self.assertEqual("missing_ldap_record", ae.code)
|
||||
|
||||
def test_get_user_with_caps(self):
|
||||
user_info = LdapService.user_info("LB3DP")
|
||||
self.assertIsNotNone(user_info)
|
||||
self.assertEqual("lb3dp", user_info.uid)
|
||||
|
|
Loading…
Reference in New Issue