def test_str_repr_call_info(monkeypatch):
 monkeypatch.setenv('AWS_REGION', 'us-east-1')
 cinfo = calling_format.from_store_name('hello-world')
 assert (repr(cinfo) == str(cinfo))
 assert (repr(cinfo) == "CallingInfo(hello-world, <class 'boto.s3.connection.SubdomainCallingFormat'>, 'us-east-1', None)")
 cinfo = calling_format.from_store_name('hello.world')
 assert (repr(cinfo) == str(cinfo))
 assert (repr(cinfo) == "CallingInfo(hello.world, <class 'boto.s3.connection.OrdinaryCallingFormat'>, 'us-east-1', 's3.amazonaws.com')")
 cinfo = calling_format.from_store_name('Hello-World')
 assert (repr(cinfo) == str(cinfo))
 assert (repr(cinfo) == "CallingInfo(Hello-World, <class 'boto.s3.connection.OrdinaryCallingFormat'>, 'us-east-1', 's3.amazonaws.com')")

def test_str_repr_call_info ( monkeypatch ) : monkeypatch . setenv ( 'AWS_REGION' , 'us-east-1' ) cinfo = calling_format . from_store_name ( 'hello-world' ) assert ( repr ( cinfo ) == str ( cinfo ) ) assert ( repr ( cinfo ) == "CallingInfo(hello-world, <class 'boto.s3.connection.SubdomainCallingFormat'>, 'us-east-1', None)" ) cinfo = calling_format . from_store_name ( 'hello.world' ) assert ( repr ( cinfo ) == str ( cinfo ) ) assert ( repr ( cinfo ) == "CallingInfo(hello.world, <class 'boto.s3.connection.OrdinaryCallingFormat'>, 'us-east-1', 's3.amazonaws.com')" ) cinfo = calling_format . from_store_name ( 'Hello-World' ) assert ( repr ( cinfo ) == str ( cinfo ) ) assert ( repr ( cinfo ) == "CallingInfo(Hello-World, <class 'boto.s3.connection.OrdinaryCallingFormat'>, 'us-east-1', 's3.amazonaws.com')" )
ensure callinginfo renders sensibly .