aminghadersohi commented on code in PR #38576:
URL: https://github.com/apache/superset/pull/38576#discussion_r3482279268


##########
tests/unit_tests/utils/test_screenshot_cache_fix.py:
##########
@@ -260,8 +265,10 @@ def test_trigger_on_expired_error(self, mock_app):
     @patch("superset.utils.screenshots.app")
     def test_no_trigger_on_fresh_error(self, mock_app):
         """Test that fresh ERROR status does not trigger task."""
-        # Set TTL to 300 seconds
-        mock_app.config = {"THUMBNAIL_ERROR_CACHE_TTL": 300}
+        mock_app.config = {
+            "THUMBNAIL_COMPUTING_CACHE_TTL": 300,
+            "THUMBNAIL_ERROR_CACHE_TTL": 300,
+        }

Review Comment:
   Fixed in b16b712 — added mock_app: MagicMock and -> None to 
test_no_trigger_on_fresh_error.



##########
tests/unit_tests/utils/test_screenshot_cache_fix.py:
##########
@@ -194,7 +197,7 @@ class TestShouldTriggerTask:
     def test_trigger_on_stale_computing_status(self, mock_app):
         """Test that stale COMPUTING status triggers recomputation."""
         # Set TTL to 300 seconds
-        mock_app.config = {"THUMBNAIL_ERROR_CACHE_TTL": 300}
+        mock_app.config = {"THUMBNAIL_COMPUTING_CACHE_TTL": 300}

Review Comment:
   Fixed in b16b712 — added mock_app: MagicMock and -> None to 
test_trigger_on_stale_computing_status.



##########
tests/unit_tests/utils/test_screenshot_cache_fix.py:
##########
@@ -76,6 +78,7 @@ class TestCacheOnlyOnSuccess:
 
     def _setup_mocks(self, mocker: MockerFixture, screenshot_obj):
         """Helper method to set up common mocks."""
+        mocker.patch(DISTRIBUTED_LOCK_PATH)

Review Comment:
   Fixed in b16b712 — added screenshot_obj: BaseScreenshot and -> MagicMock to 
_setup_mocks.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to