Skip to content

Commit

Permalink
#248 fixed client proxy tests for tornado 6
Browse files Browse the repository at this point in the history
  • Loading branch information
bugy committed Dec 29, 2019
1 parent 4814678 commit 2432347
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/tests/web/tornado_client_config_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from tornado.util import Configurable

from tests import test_utils
from tests.test_utils import mock_object
from web.client import tornado_client_config


Expand Down Expand Up @@ -48,7 +49,10 @@ def test_no_pycurl(self):
self.assert_proxy(None, None)

def run_initialize(self):
with mock.patch.dict(sys.modules, {'pycurl': sys}):
module_mock = mock_object()
module_mock.Curl = ''

with mock.patch.dict(sys.modules, {'pycurl': module_mock}):
tornado_client_config.initialize()

def assert_proxy(self, host, port, username=None, password=None):
Expand Down

0 comments on commit 2432347

Please sign in to comment.