villebro commented on code in PR #29912:
URL: https://github.com/apache/superset/pull/29912#discussion_r1738828593


##########
tests/unit_tests/async_events/async_query_manager_tests.py:
##########
@@ -26,17 +27,27 @@
     AsyncQueryManager,
     AsyncQueryTokenException,
 )
+from superset.async_events.cache_backend import (
+    RedisCacheBackend,
+    RedisSentinelCacheBackend,
+)
 
 JWT_TOKEN_SECRET = "some_secret"
 JWT_TOKEN_COOKIE_NAME = "superset_async_jwt"
 
+# Define the cache backends once as mocks
+cache_backends = {
+    "RedisCacheBackend": mock.Mock(spec=RedisCacheBackend),
+    "RedisSentinelCacheBackend": mock.Mock(spec=RedisSentinelCacheBackend),
+    "redis.Redis": mock.Mock(spec=redis.Redis),
+}
+

Review Comment:
   Thanks for putting in the extra effort on these tests @nsivarajan ! Let's 
not let this derail your PR - I can also take a stab at migrating the remaining 
components to `pytest` (seems like a fun coffee break challenge).



-- 
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