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()
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()