Exemple #1
0
 def test_rpc_error_raises_error(self):
     responses.add(
         responses.POST, self.dummy_url, status=200, json={"error": "dummy error"},
     )
     client = AuthServiceProxy(self.dummy_url)
     with pytest.raises(JSONRPCException):
         client.dummy_method()
Exemple #2
0
 def test_http_error_raises_error(self, code):
     responses.add(responses.POST, self.dummy_url, status=code)
     client = AuthServiceProxy(self.dummy_url)
     with pytest.raises(JSONRPCException):
         client.dummy_method()