MCPcopy Create free account
hub / github.com/wal-e/wal-e / no_real_s3_credentials

Function no_real_s3_credentials

tests/s3_integration_help.py:17–31  ·  view source on GitHub ↗

Helps skip integration tests without live credentials. Phrased in the negative to make it read better with 'skipif'.

()

Source from the content-addressed store, hash-verified

15
16
17def no_real_s3_credentials():
18 """Helps skip integration tests without live credentials.
19
20 Phrased in the negative to make it read better with 'skipif'.
21 """
22 if parse_boolean_envvar(os.getenv(
23 'WALE_S3_INTEGRATION_TESTS')) is not True:
24 return True
25
26 for e_var in ('AWS_ACCESS_KEY_ID',
27 'AWS_SECRET_ACCESS_KEY'):
28 if os.getenv(e_var) is None:
29 return True
30
31 return False
32
33
34def prepare_s3_default_test_bucket():

Callers 2

default_test_bucketFunction · 0.85

Calls 1

parse_boolean_envvarFunction · 0.90

Tested by

no test coverage detected