@@ -49,6 +49,12 @@ def setUp(self):
4949 self ._proxy_user = 'admin'
5050 self ._proxy_pass = 'password'
5151
52+ self ._timeout = {
53+ 'timeout' : {
54+ 'sock_read' : 120
55+ }
56+ }
57+
5258 def test_network_status (self ):
5359 get_response = 'Success'
5460 self ._init_filer (get_response = get_response )
@@ -137,7 +143,7 @@ def test_tcp_connect_success(self):
137143
138144 ret = network .Network (self ._filer ).tcp_connect (TCPService (self ._tcp_connect_address , self ._tcp_connect_port ))
139145
140- self ._filer .api .execute .assert_called_once_with ('/status/network' , 'tcpconnect' , mock .ANY )
146+ self ._filer .api .execute .assert_called_once_with ('/status/network' , 'tcpconnect' , mock .ANY , self . _timeout )
141147 self ._filer .tasks .wait .assert_called_once_with (self ._task_id )
142148
143149 expected_param = self ._get_tcp_connect_object ()
@@ -157,7 +163,7 @@ def test_tcp_connect_failure(self):
157163
158164 ret = network .Network (self ._filer ).tcp_connect (TCPService (self ._tcp_connect_address , self ._tcp_connect_port ))
159165
160- self ._filer .api .execute .assert_called_once_with ('/status/network' , 'tcpconnect' , mock .ANY )
166+ self ._filer .api .execute .assert_called_once_with ('/status/network' , 'tcpconnect' , mock .ANY , self . _timeout )
161167 self ._filer .tasks .wait .assert_called_once_with (self ._task_id )
162168
163169 expected_param = self ._get_tcp_connect_object ()
@@ -200,7 +206,7 @@ def test_tcp_connect_task_error(self):
200206
201207 ret = network .Network (self ._filer ).tcp_connect (TCPService (self ._tcp_connect_address , self ._tcp_connect_port ))
202208
203- self ._filer .api .execute .assert_called_once_with ('/status/network' , 'tcpconnect' , mock .ANY )
209+ self ._filer .api .execute .assert_called_once_with ('/status/network' , 'tcpconnect' , mock .ANY , self . _timeout )
204210 self ._filer .tasks .wait .assert_called_once_with (self ._task_id )
205211
206212 expected_param = self ._get_tcp_connect_object ()
0 commit comments