File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -1146,7 +1146,7 @@ def __init__(
11461146 if security is None and isinstance (address , str ):
11471147 security = _maybe_call_security_loader (address )
11481148
1149- if security is None :
1149+ if security is None or security is False :
11501150 security = Security ()
11511151 elif isinstance (security , dict ):
11521152 security = Security (** security )
Original file line number Diff line number Diff line change @@ -209,6 +209,16 @@ async def test_security_dict_input_no_security():
209209 assert result == 2
210210
211211
212+ @gen_test ()
213+ async def test_security_bool_input_disabled_security ():
214+ async with Scheduler (dashboard_address = ":0" , security = False ) as s :
215+ async with Worker (s .address , security = False ):
216+ async with Client (s .address , security = False , asynchronous = True ) as c :
217+ result = await c .submit (inc , 1 )
218+ assert c .security .require_encryption is False
219+ assert result == 2
220+
221+
212222@gen_test ()
213223async def test_security_dict_input ():
214224 conf = tls_config ()
You can’t perform that action at this time.
0 commit comments