/usr/lib/python3/dist-packages/keyring/tests/backends/test_Windows.py is in python3-keyring 10.6.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | from __future__ import print_function
import sys
import unittest
import pytest
import keyring.backends.Windows
from ..test_backend import BackendBasicTests
@unittest.skipUnless(keyring.backends.Windows.WinVaultKeyring.viable,
"Needs Windows")
class WinVaultKeyringTestCase(BackendBasicTests, unittest.TestCase):
def tearDown(self):
# clean up any credentials created
for cred in self.credentials_created:
try:
self.keyring.delete_password(*cred)
except Exception as e:
print(e, file=sys.stderr)
def init_keyring(self):
return keyring.backends.Windows.WinVaultKeyring()
@pytest.mark.skipif('sys.platform != "win32"')
def test_winvault_always_viable():
"""
The WinVault backend should always be viable on Windows.
"""
assert keyring.backends.Windows.WinVaultKeyring.viable
|