예제 #1
0
 def test_step_has_different_api_token(self):
     step = Step(file_upload_api_token="good-api-token")
     with self.assertRaisesRegex(
             UploadError,
             "UploadError<403,authorization-bearer-token-invalid>"):
         raise_if_api_token_is_wrong(step, "bad-api-token")
예제 #2
0
 def test_step_has_same_api_token(self):
     step = Step(file_upload_api_token="good-api-token")
     raise_if_api_token_is_wrong(step, "good-api-token")
예제 #3
0
 def test_step_has_no_api_token(self):
     step = Step(file_upload_api_token=None)
     with self.assertRaisesRegex(UploadError,
                                 "UploadError<403,step-has-no-api-token>"):
         raise_if_api_token_is_wrong(step, "some-api-token")