Fix TaskQueue test after changes in appscale_info
@@ -11,18 +11,21 @@ class TestDistributedTaskQueue(unittest.TestCase):
"""
A set of test cases for the distributed taskqueue module
"""
- def setUp(self):
- self._read_patcher = patch.object(
- file_io, 'read', return_value='192.168.0.1')
- self.read_mock = self._read_patcher.start()
-
- def tearDown(self):
- self._read_patcher.stop()
@staticmethod
def test_distributed_tq_initialization():
db_access = MagicMock()
zk_client = MagicMock()
+ lb_ips_patcher = patch(
+ 'appscale.common.appscale_info.get_load_balancer_ips',
+ return_value=['192.168.0.1']
+ )
+ db_proxy_patcher = patch(
+ 'appscale.common.appscale_info.get_db_proxy',
+ return_value=['192.168.0.1']
+ )
+ with lb_ips_patcher:
+ with db_proxy_patcher:
distributed_tq.DistributedTaskQueue(db_access, zk_client)
# TODO:
