File tree Expand file tree Collapse file tree 3 files changed +3
-8
lines changed
nisystemlink/clients/core Expand file tree Collapse file tree 3 files changed +3
-8
lines changed Original file line number Diff line number Diff line change 7171created_response = client .create_specs (CreateSpecificationsRequest (specs = spec_requests ))
7272
7373# use get for first spec created
74- if len (created_response .created_specs ) > 0 :
74+ if created_response . created_specs and len (created_response .created_specs ) > 0 :
7575 created_spec = client .get_spec (created_response .created_specs [0 ].id )
7676
7777# You can query specs based on any field using DynamicLinq syntax.
Original file line number Diff line number Diff line change @@ -5,4 +5,3 @@ class ApiErrorResponse:
55 """Represents an error response from the SystemLink API responses."""
66
77 error : ApiError
8-
Original file line number Diff line number Diff line change @@ -261,17 +261,13 @@ def test__get_spec_by_id__spec_matches_expected(
261261 assert get_spec_response .id == created_spec .id
262262 assert get_spec_response .product_id == productId
263263
264- def test__get_non_existant_spec_by_id__get_spec_fails (
265- self , client : SpecClient
266- ):
264+ def test__get_non_existant_spec_by_id__get_spec_fails (self , client : SpecClient ):
267265 non_existant_spec_id = "10"
268266 with pytest .raises (ApiException ) as exception_info :
269267 client .get_spec (non_existant_spec_id )
270268 assert exception_info .value .http_status_code == 404
271269
272- def test__get_spec_by_invalid_id__get_spec_fails (
273- self , client : SpecClient
274- ):
270+ def test__get_spec_by_invalid_id__get_spec_fails (self , client : SpecClient ):
275271 invalid_spec_id = "110ac9e841879870a0b410dabfa02a0e"
276272 with pytest .raises (ApiException ) as exception_info :
277273 client .get_spec (invalid_spec_id )
You can’t perform that action at this time.
0 commit comments