@@ -98,6 +98,7 @@ def _teardown_ssd_test_setup():
9898    if  'SF_OCSP_ACTIVATE_SSD'  in  os .environ :
9999        del  os .environ ['SF_OCSP_ACTIVATE_SSD' ]
100100
101+ 
101102def  _create_host_spec_ocsp_bypass_ssd (ocsp , priv_key , hostname ):
102103
103104    """ 
@@ -149,13 +150,13 @@ def test_host_spec_ocsp_bypass_ssd():
149150
150151    acc_name  =  ocsp .get_account_from_hostname (hostname [0 ])
151152    cache_status , cur_host_spec_token  =  ocsp .SSD .find_in_ssd_cache (acc_name )
152-     assert (( cur_host_spec_token  is  not   None ) , "Failed to read host specific directive" ) 
153+     assert   cur_host_spec_token  is  not   None , "Failed to read host specific directive" 
153154
154155    try :
155-         assert ( ocsp .process_ocsp_bypass_directive (cur_host_spec_token , '*' , hostname ), 
156-                "Failed to process host specific bypass ssd" ) 
156+         assert   ocsp .process_ocsp_bypass_directive (cur_host_spec_token , '*' , hostname [ 0 ]), \ 
157+                "Failed to process host specific bypass ssd" 
157158    except  Exception  as  ex :
158-         print ("Exception while processing SSD :" + ex )
159+         print ("Exception while processing SSD :" + str ( ex ) )
159160
160161
161162def  test_host_spec_ocsp_bypass_updated_ssd ():
@@ -188,7 +189,7 @@ def test_host_spec_ocsp_bypass_updated_ssd():
188189
189190    acc_name  =  ocsp .get_account_from_hostname (hostname [0 ])
190191    cache_status , cur_host_spec_token  =  ocsp .SSD .find_in_ssd_cache (acc_name )
191-     assert (( cur_host_spec_token  is  not   None ) , "Failed to read host specific directive" ) 
192+     assert   cur_host_spec_token  is  not   None , "Failed to read host specific directive" 
192193
193194    try :
194195        assert  ocsp .process_ocsp_bypass_directive (cur_host_spec_token , '*' , hostname [1 ]),\
@@ -227,7 +228,7 @@ def test_invalid_host_spec_ocsp_bypass_updated_ssd():
227228
228229    acc_name  =  ocsp .get_account_from_hostname (hostname [0 ])
229230    cache_status , cur_host_spec_token  =  ocsp .SSD .find_in_ssd_cache (acc_name )
230-     assert (( cur_host_spec_token  is  not   None ) , "Failed to read host specific directive" ) 
231+     assert   cur_host_spec_token  is  not   None , "Failed to read host specific directive" 
231232
232233    try :
233234        assert  ocsp .process_ocsp_bypass_directive (cur_host_spec_token , '*' , "sonytv.snowflakecomputing.com" ) is  False ,\
@@ -284,8 +285,8 @@ def test_certid_spec_bypass_ssd():
284285    hostname  =  'sfcsupport.us-east-1.snowflakecomputing.com' 
285286
286287    connection  =  _openssl_connect (hostname )
287-     assert  ( ocsp .validate (hostname , connection ),
288-              "Failed to validate {} using Cert specific OCSP Bypass SSD" .format (hostname ) )
288+     assert  ocsp .validate (hostname , connection ), \ 
289+         "Failed to validate {} using Cert specific OCSP Bypass SSD" .format (hostname )
289290
290291
291292def  test_invalid_certid_spec_bypass_ssd ():
@@ -330,8 +331,8 @@ def test_invalid_certid_spec_bypass_ssd():
330331    except  Exception :
331332        exception_occured  =  True 
332333
333-     assert ( exception_occured ,
334-             "No exception raised for bad Server Side Directive" ) 
334+     assert   exception_occured ,\ 
335+         "No exception raised for bad Server Side Directive" 
335336
336337
337338def  test_wildcard_ocsp_bypass_ssd ():
@@ -364,8 +365,8 @@ def test_wildcard_ocsp_bypass_ssd():
364365
365366    ocsp  =  _setup_ssd_test (temp_ocsp_file_path )
366367    connection  =  _openssl_connect (hostname )
367-     assert  ( ocsp .validate (hostname , connection ),
368-              "Failed to validate {0} using Wildcard OCSP Bypass SSD" .format (hostname ) )
368+     assert  ocsp .validate (hostname , connection ), \ 
369+         "Failed to validate {0} using Wildcard OCSP Bypass SSD" .format (hostname )
369370
370371
371372def  test_key_upd_ssd ():
@@ -415,8 +416,8 @@ def test_key_upd_ssd():
415416        print ("Exception occurred : " + str (ex ))
416417
417418    ocsp_cur_pub_key  =  ocsp .SSD .ssd_pub_key_dep1 .get_key ()
418-     assert ( pub_key_new  ==  ocsp_cur_pub_key ,
419-             "Failed to read Key Update Directive" ) 
419+     assert   pub_key_new  ==  ocsp_cur_pub_key ,\ 
420+         "Failed to read Key Update Directive" 
420421
421422    _create_host_spec_ocsp_bypass_ssd (ocsp , priv_key , hostname )
422423
0 commit comments