Skip to main content
Glama

mcp-flowise

by matthewhand
test_tool_prediction.py1.01 kB
import unittest import os from mcp_flowise.utils import flowise_predict class TestToolPrediction(unittest.TestCase): """ Integration test for predicting results from a Flowise chatflow. """ def test_tool_prediction(self): """ Test the prediction function for a Flowise chatflow. """ # Check if FLOWISE_CHATFLOW_ID is set chatflow_id = os.getenv("FLOWISE_CHATFLOW_ID") if not chatflow_id: self.skipTest("FLOWISE_CHATFLOW_ID environment variable is not set.") question = "What is the weather like today?" print(f"Using chatflow_id: {chatflow_id}") # Make a prediction result = flowise_predict(chatflow_id, question) # Validate the response self.assertIsInstance(result, str) self.assertNotEqual(result.strip(), "", "Prediction result should not be empty.") print(f"Prediction result: {result}") if __name__ == "__main__": unittest.main()

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/matthewhand/mcp-flowise'

If you have feedback or need assistance with the MCP directory API, please join our Discord server