File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
nisystemlink/clients/core Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 33
44
55class ApiErrorResponse (JsonModel ):
6- """Represents an error response from the SystemLink API responses ."""
6+ """Represents an error response from the SystemLink APIs ."""
77
88 error : ApiError
Original file line number Diff line number Diff line change @@ -251,26 +251,33 @@ def test__get_spec_by_id__spec_matches_expected(
251251 category = "Parametric Specs" ,
252252 block = "newBlock" ,
253253 )
254+
254255 response = create_specs (CreateSpecificationsRequest (specs = [spec ]))
256+
255257 assert response is not None
256258 assert len (response .created_specs ) == 1
257259 created_spec = response .created_specs [0 ]
258260
259261 get_spec_response = client .get_spec (created_spec .id )
262+
260263 assert isinstance (get_spec_response , Specification )
261264 assert get_spec_response .id == created_spec .id
262265 assert get_spec_response .product_id == productId
263266
264267 def test__get_non_existant_spec_by_id__get_spec_fails (self , client : SpecClient ):
265268 non_existant_spec_id = "10"
269+
266270 with pytest .raises (ApiException ) as exception_info :
267271 client .get_spec (non_existant_spec_id )
272+
268273 assert exception_info .value .http_status_code == 404
269274
270275 def test__get_spec_by_invalid_id__get_spec_fails (self , client : SpecClient ):
271276 invalid_spec_id = "110ac9e841879870a0b410dabfa02a0e"
277+
272278 with pytest .raises (ApiException ) as exception_info :
273279 client .get_spec (invalid_spec_id )
280+
274281 assert exception_info .value .http_status_code == 400
275282
276283 def test__query_product__all_returned (
You can’t perform that action at this time.
0 commit comments