def test_cert_validation_sensitivity(monkeypatch):
 monkeypatch.setenv('AWS_REGION', 'us-east-1')
 for bn in SUBDOMAIN_OK:
  if ('.' not in bn):
   cinfo = calling_format.from_store_name(bn)
   assert (cinfo.calling_format == boto.s3.connection.SubdomainCallingFormat)
  else:
   assert ('.' in bn)
   cinfo = calling_format.from_store_name(bn)
   assert (cinfo.calling_format == connection.OrdinaryCallingFormat)
   assert (cinfo.region == 'us-east-1')
   assert (cinfo.ordinary_endpoint == 's3.amazonaws.com')

def test_cert_validation_sensitivity ( monkeypatch ) : monkeypatch . setenv ( 'AWS_REGION' , 'us-east-1' ) for bn in SUBDOMAIN_OK : if ( '.' not in bn ) : cinfo = calling_format . from_store_name ( bn ) assert ( cinfo . calling_format == boto . s3 . connection . SubdomainCallingFormat ) else : assert ( '.' in bn ) cinfo = calling_format . from_store_name ( bn ) assert ( cinfo . calling_format == connection . OrdinaryCallingFormat ) assert ( cinfo . region == 'us-east-1' ) assert ( cinfo . ordinary_endpoint == 's3.amazonaws.com' )
test degradation of dotted bucket names to ordinarycallingformat although legal bucket names with subdomaincallingformat .