Skip to content

Commit

Permalink
test cases refactored
Browse files Browse the repository at this point in the history
  • Loading branch information
Aryan-Singh-14 committed Jul 26, 2023
1 parent 783fbde commit 419da8a
Showing 1 changed file with 0 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,10 @@ def test_execute(stable_diffusion_tool):
tool.resource_manager = Mock()
tool.agent_id = 123 # Use a dummy agent_id for testing purposes
tool.toolkit_config.get_tool_config = lambda key: 'fake_api_key' if key == 'STABILITY_API_KEY' else 'engine_id_1'
# Change 'engine_id_1' to the appropriate value for the "ENGINE_ID" key in your real code

prompt = 'Test prompt'
image_names = ['img1.png', 'img2.png']
expected_result = 'Images downloaded and saved successfully'

result = tool._execute(prompt, image_names)

assert result.startswith(expected_result)
tool.resource_manager.write_binary_file.assert_called()

Expand Down

0 comments on commit 419da8a

Please sign in to comment.