@pytest.mark.skipif((noboto3 or (not fakes3)), reason=u'boto3 or fakes3 library is not available')
def test_aws_keys_from_env():
 ds = nio.DataSink()
 aws_access_key_id = u'ABCDACCESS'
 aws_secret_access_key = u'DEFGSECRET'
 os.environ[u'AWS_ACCESS_KEY_ID'] = aws_access_key_id
 os.environ[u'AWS_SECRET_ACCESS_KEY'] = aws_secret_access_key
 (access_key_test, secret_key_test) = ds._return_aws_keys()
 assert (aws_access_key_id == access_key_test)
 assert (aws_secret_access_key == secret_key_test)

@ pytest . mark . skipif ( ( noboto3 or ( not fakes3 ) ) , reason = u'boto3 or fakes3 library is not available' ) def test_aws_keys_from_env ( ) : ds = nio . DataSink ( ) aws_access_key_id = u'ABCDACCESS' aws_secret_access_key = u'DEFGSECRET' os . environ [ u'AWS_ACCESS_KEY_ID' ] = aws_access_key_id os . environ [ u'AWS_SECRET_ACCESS_KEY' ] = aws_secret_access_key ( access_key_test , secret_key_test ) = ds . _return_aws_keys ( ) assert ( aws_access_key_id == access_key_test ) assert ( aws_secret_access_key == secret_key_test )
function to ensure the datasink can successfully read in aws credentials from the environment variables .