@@ -28,20 +28,11 @@ class UpdateSubjectTest(unittest.TestCase):
2828
2929 def test_initialize_command_line_args (self ):
3030 actual = update_subject .initialize_command_line_args (
31- ["--name=test@test.com" , "--type=ANALYST" , "-- roles=" ])
31+ ["--name=test@test.com" , "--roles=" ])
3232 self .assertEqual (
3333 actual ,
3434 argparse .Namespace (
35- credentials_file = None ,
36- name = "test@test.com" ,
37- type = "ANALYST" ,
38- roles = "" ,
39- region = "us" ))
40-
41- def test_initialize_command_line_args_invalid_type (self ):
42- actual = update_subject .initialize_command_line_args (
43- ["--name=test@test.com" , "--type=INVALID" , "--roles=" ])
44- self .assertIsNone (actual )
35+ credentials_file = None , name = "test@test.com" , roles = "" , region = "us" ))
4536
4637 @mock .patch .object (requests , "AuthorizedSession" , autospec = True )
4738 @mock .patch .object (requests .requests , "Response" , autospec = True )
@@ -52,15 +43,14 @@ def test_update_subject_error(self, mock_response, mock_session):
5243 requests .requests .exceptions .HTTPError ())
5344
5445 with self .assertRaises (requests .requests .exceptions .HTTPError ):
55- update_subject .update_subject (mock_session , "" , "" , [])
46+ update_subject .update_subject (mock_session , "" , [])
5647
5748 @mock .patch .object (requests , "AuthorizedSession" , autospec = True )
5849 @mock .patch .object (requests .requests , "Response" , autospec = True )
5950 def test_update_subject (self , mock_response , mock_session ):
6051 mock_session .request .return_value = mock_response
6152 type(mock_response ).status_code = mock .PropertyMock (return_value = 200 )
6253 subject_id = "test@test.com"
63- subject_type = "ANALYST"
6454 roles = ["Test" ]
6555 expected = {
6656 "subject" : {
@@ -89,8 +79,7 @@ def test_update_subject(self, mock_response, mock_session):
8979 },
9080 }
9181 mock_response .json .return_value = expected
92- actual = update_subject .update_subject (mock_session , subject_id ,
93- subject_type , roles )
82+ actual = update_subject .update_subject (mock_session , subject_id , roles )
9483 self .assertEqual (actual , expected )
9584
9685
0 commit comments