def test_malformed_credentials(self): with self.assertRaises(httplib2_utils.AuthError): httplib2_utils.get_authenticated_http( 'creds_malformed.json', service_accounts_creds_root=DATA_DIR)
def test_valid_credentials(self): http = httplib2_utils.get_authenticated_http( 'valid_creds.json', service_accounts_creds_root=DATA_DIR) self.assertIsInstance(http, httplib2.Http)