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")
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")
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")