Ejemplo n.º 1
0
 def test_file_aws(self):
     os.environ.clear()
     provider = FileAWSCredentials(CREDENTIALS_SAMPLE)
     creds, expiry = provider.retrieve()
     eq_(creds.access_key, "accessKey")
     eq_(creds.secret_key, "secret")
     eq_(creds.session_token, "token")
     eq_(expiry, None)
Ejemplo n.º 2
0
 def test_file_aws_env_profile(self):
     os.environ.clear()
     os.environ["AWS_PROFILE"] = "no_token"
     provider = FileAWSCredentials(CREDENTIALS_SAMPLE)
     creds, expiry = provider.retrieve()
     eq_(creds.access_key, "accessKey")
     eq_(creds.secret_key, "secret")
     eq_(creds.session_token, None)
     eq_(expiry, None)
Ejemplo n.º 3
0
 def test_file_aws_no_creds(self):
     os.environ.clear()
     provider = FileAWSCredentials(
         CREDENTIALS_EMPTY,
         "no_token",
     )
     creds, expiry = provider.retrieve()
     eq_(creds.access_key, None)
     eq_(creds.secret_key, None)
     eq_(creds.session_token, None)
     eq_(expiry, None)