ara-cli 0.1.10.1__py3-none-any.whl → 0.1.10.5__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -698,16 +698,24 @@ class TestArtefactAndTemplateHandling:
698
698
 
699
699
  mock_collect.return_value = ("### GIVENS\ncontent", [{"type": "image_url"}])
700
700
 
701
- final_message_list = [{'role': 'user', 'content': ['### GIVENS\ncontent', {'type': 'image_url'}]}]
702
- mock_append_images.return_value = final_message_list
701
+ # append_images_to_message returns a single dict, not a list of dicts.
702
+ returned_message_dict = {'role': 'user', 'content': ['### GIVENS\ncontent', {'type': 'image_url'}]}
703
+ mock_append_images.return_value = returned_message_dict
703
704
 
704
705
  mock_send.return_value = iter([MagicMock(choices=[MagicMock(delta=MagicMock(content="llm response"))])])
705
706
 
706
707
  prompt_handler.create_and_send_custom_prompt(self.mock_classifier, self.mock_param)
707
708
 
708
709
  mock_collect.assert_called_once()
709
- mock_append_images.assert_called_once_with([{'role': 'user', 'content': '### GIVENS\ncontent'}], [{'type': 'image_url'}])
710
- mock_send.assert_called_once_with(final_message_list)
710
+
711
+ # Assert that append_images_to_message was called with a single dict (the bug fix)
712
+ mock_append_images.assert_called_once_with(
713
+ {'role': 'user', 'content': '### GIVENS\ncontent'},
714
+ [{'type': 'image_url'}]
715
+ )
716
+
717
+ # Assert that send_prompt was called with a list containing the dict returned from append_images_to_message
718
+ mock_send.assert_called_once_with([returned_message_dict])
711
719
 
712
720
  log_file = self.root / "ara" / self.mock_classifier / f"{self.mock_param}.data" / f"{self.mock_classifier}.prompt_log.md"
713
721
  assert "llm response" in log_file.read_text()