Exercise a case where connecting is region-oblivious.
()
| 97 | |
| 98 | @pytest.mark.skipif("no_real_s3_credentials()") |
| 99 | def test_subdomain_compatible(): |
| 100 | """Exercise a case where connecting is region-oblivious.""" |
| 101 | creds = Credentials(os.getenv('AWS_ACCESS_KEY_ID'), |
| 102 | os.getenv('AWS_SECRET_ACCESS_KEY')) |
| 103 | |
| 104 | bucket_name = bucket_name_mangle('wal-e-test-us-west-1-no-dots') |
| 105 | |
| 106 | cinfo = calling_format.from_store_name(bucket_name) |
| 107 | |
| 108 | with FreshBucket(bucket_name, |
| 109 | host='s3-us-west-1.amazonaws.com', |
| 110 | calling_format=connection.OrdinaryCallingFormat()) as fb: |
| 111 | fb.create(location='us-west-1') |
| 112 | conn = cinfo.connect(creds) |
| 113 | |
| 114 | assert cinfo.region is None |
| 115 | assert cinfo.calling_format is connection.SubdomainCallingFormat |
| 116 | assert isinstance(conn.calling_format, |
| 117 | connection.SubdomainCallingFormat) |
| 118 | |
| 119 | |
| 120 | def test_ipv4_detect(): |
nothing calls this directly
no test coverage detected