Ejemplo n.º 1
0
 def test_bad_token(self):
     """Connect with a bad token."""
     with self.assertRaises(SolverAuthenticationError):
         invalid_config = config.copy()
         invalid_config.update(token='invalid-token')
         with Client(**invalid_config) as client:
             client.get_solvers()
Ejemplo n.º 2
0
 def test_bad_url(self):
     """Connect with a bad URL."""
     with self.assertRaises(IOError):
         invalid_config = config.copy()
         invalid_config.update(endpoint='invalid-endpoint')
         with Client(**invalid_config) as client:
             client.get_solvers()