File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change 11import pytest
2+ import niquests
23from seam import Seam
34from seam .exceptions import (
45 SeamHttpApiError ,
@@ -44,3 +45,18 @@ def test_seam_http_throws_invalid_input_error(server):
4445 assert err .status_code == 400
4546 assert err .code == "invalid_input"
4647 assert err .request_id .startswith ("request" )
48+
49+
50+ def test_seam_http_throws_http_error_on_non_standard_response (server ):
51+ endpoint , seed = server
52+ seam = Seam .from_api_key (seed ["seam_apikey1_token" ], endpoint = endpoint )
53+
54+ seam .client .post (
55+ "/_fake/simulate_workspace_outage" ,
56+ json = {"workspace_id" : seed ["seed_workspace_1" ], "routes" : ["/devices/list" ]},
57+ )
58+
59+ with pytest .raises (niquests .HTTPError ) as exc_info :
60+ seam .devices .list ()
61+
62+ assert exc_info .value .response .status_code == 503
You can’t perform that action at this time.
0 commit comments