Some clean up and added interactable images.
Python CI / test (push) Successful in 6m34s

This commit is contained in:
2025-11-07 22:56:35 +01:00
parent 15305011dc
commit 49d4e551f8
7 changed files with 391 additions and 58 deletions
+12 -12
View File
@@ -88,11 +88,11 @@ class TestLink(unittest.TestCase):
callback=self.mock_callback,
params=params
)
result = link.execute()
# Should call callback with location and params
self.mock_callback.assert_called_once_with("/api/save", action="save", id=123)
# Should call callback with location, point (None when not provided), and params
self.mock_callback.assert_called_once_with("/api/save", None, action="save", id=123)
self.assertEqual(result, "callback_result")
def test_function_link_execution(self):
@@ -104,11 +104,11 @@ class TestLink(unittest.TestCase):
callback=self.mock_callback,
params=params
)
result = link.execute()
# Should call callback with location and params
self.mock_callback.assert_called_once_with("save_document", data="test")
# Should call callback with location, point (None when not provided), and params
self.mock_callback.assert_called_once_with("save_document", None, data="test")
self.assertEqual(result, "callback_result")
def test_api_link_without_callback(self):
@@ -204,11 +204,11 @@ class TestButton(unittest.TestCase):
"""Test executing enabled button."""
params = {"data": "test_data"}
button = Button("Test", self.mock_callback, params=params, enabled=True)
result = button.execute()
# Should call callback with params
self.mock_callback.assert_called_once_with(data="test_data")
# Should call callback with point (None when not provided) and params
self.mock_callback.assert_called_once_with(None, data="test_data")
self.assertEqual(result, "button_clicked")
def test_button_execute_disabled(self):