Example #1
0
 def test_jira_server(self):
     user_response = StubService.get_stub_data("jira",
                                               "jira_server_user.json")
     assert build_user_choice(user_response, user_id_field="name") == (
         "bob",
         "Bobby - [email protected] (bob)",
     )
Example #2
0
 def test_unexpected_id(self):
     user_response = StubService.get_stub_data("jira", "user.json")
     assert build_user_choice(user_response, user_id_field="name") is None
Example #3
0
 def test_jira_cloud(self):
     user_response = StubService.get_stub_data("jira", "user.json")
     assert build_user_choice(user_response, user_id_field="accountId") == (
         "012345:00000000-1111-2222-3333-444444444444",
         "Saif Hakim",
     )
Example #4
0
 def test_jira_server(self):
     user_response = json.loads(EXAMPLE_JIRA_SERVER_USER)
     assert build_user_choice(user_response, user_id_field="name") == (
         "bob",
         "Bobby - [email protected] (bob)",
     )
Example #5
0
 def test_unexpected_id(self):
     user_response = json.loads(EXAMPLE_JIRA_CLOUD_USER)
     assert build_user_choice(user_response, user_id_field="name") is None
Example #6
0
 def test_jira_cloud(self):
     user_response = json.loads(EXAMPLE_JIRA_CLOUD_USER)
     assert build_user_choice(user_response, user_id_field="accountId") == (
         "012345:00000000-1111-2222-3333-444444444444",
         "Saif Hakim",
     )