diff --git a/aider/tests/test_help.py b/aider/tests/test_help.py index e7e534253..93e12c20d 100644 --- a/aider/tests/test_help.py +++ b/aider/tests/test_help.py @@ -12,7 +12,7 @@ class TestHelp(unittest.TestCase): def test_init(self): self.assertIsNotNone(self.help.retriever) - def test_ask(self): + def test_ask_with_mock(self): mock_node = MagicMock() mock_node.text = "Test content" mock_node.metadata = {"url": "https://example.com"} @@ -25,6 +25,20 @@ class TestHelp(unittest.TestCase): self.assertIn("Test content", result) self.assertIn("", result) + def test_ask_without_mock(self): + help_instance = Help() + question = "What is aider?" + result = help_instance.ask(question) + + self.assertIn(f"# Question: {question}", result) + self.assertIn("", result) + self.assertGreater(len(result), 100) # Ensure we got a substantial response + + # Check for some expected content (adjust based on your actual help content) + self.assertIn("aider", result.lower()) + self.assertIn("ai", result.lower()) + self.assertIn("chat", result.lower()) if __name__ == '__main__': unittest.main()