コード例 #1
0
 def test_pull_env_credential_old_style(self):
     keyring.set_keyring(TestKeyring())
     result = credentials.pull_env_credential('prod', 'OS_PASSWORD',
                                              'USE_KEYRING')
     assert isinstance(result, tuple)
     assert result[0] == 'prod:OS_PASSWORD'
     if six.PY3:
         assert result[1] == b'password from TestKeyring'
     else:
         assert result[1] == 'password from TestKeyring'
コード例 #2
0
 def test_pull_env_credential_old_style(self):
     keyring.set_keyring(TestKeyring())
     result = credentials.pull_env_credential('prod',
                                              'OS_PASSWORD',
                                              'USE_KEYRING'
                                              )
     assert isinstance(result, tuple)
     assert result[0] == 'prod:OS_PASSWORD'
     if six.PY3:
         assert result[1] == b'password from TestKeyring'
     else:
         assert result[1] == 'password from TestKeyring'