Fokko commented on a change in pull request #4090: [AIRFLOW-3250] Fix for Redis
Hook for not authorised connection calls
URL: https://github.com/apache/incubator-airflow/pull/4090#discussion_r234925806
##########
File path: tests/contrib/hooks/test_redis_hook.py
##########
@@ -19,32 +19,67 @@
import unittest
-from mock import patch
-
+from mock import patch, MagicMock
from airflow import configuration
from airflow.contrib.hooks.redis_hook import RedisHook
class TestRedisHook(unittest.TestCase):
+
def setUp(self):
configuration.load_test_config()
- def test_get_conn(self):
+ @patch('airflow.contrib.hooks.redis_hook.StrictRedis')
+ @patch('airflow.contrib.hooks.redis_hook.RedisHook.get_connection')
Review comment:
We should not need to patches anymore, since we have Redis running.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services