File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -206,6 +206,16 @@ def response(self) -> Response:
206
206
"""
207
207
return self ._response
208
208
209
+ @property
210
+ def target_id (self ) -> str :
211
+ """
212
+ The processing target ID.
213
+ """
214
+ path = urlparse (self .response .url ).path
215
+ # Every HTTP path which can raise this error is in the format
216
+ # `/something/{target_id}`.
217
+ return path .split (sep = '/' , maxsplit = 2 )[- 1 ]
218
+
209
219
210
220
class ProjectInactive (Exception ):
211
221
"""
Original file line number Diff line number Diff line change @@ -210,6 +210,7 @@ def test_target_status_processing(
210
210
vws_client .delete_target (target_id = target_id )
211
211
212
212
assert exc .value .response .status_code == codes .FORBIDDEN
213
+ assert exc .value .target_id == target_id
213
214
214
215
215
216
def test_metadata_too_large (
You can’t perform that action at this time.
0 commit comments