Imported Debian patch 4.7.2-3
This commit is contained in:
committed by
Mario Fetka
parent
27edeba051
commit
8bc559c5a1
@@ -35,17 +35,12 @@ SIZE_256 = 'abcdefgh' * 32
|
||||
SIZE_512 = 'abcdefgh' * 64
|
||||
SIZE_1024 = 'abcdefgh' * 128
|
||||
|
||||
|
||||
@pytest.mark.skip_if_container(
|
||||
"any", reason="kernel keyrings are not namespaced yet"
|
||||
)
|
||||
class test_keyring:
|
||||
class test_keyring(object):
|
||||
"""
|
||||
Test the kernel keyring interface
|
||||
"""
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def keyring_setup(self):
|
||||
def setup(self):
|
||||
try:
|
||||
kernel_keyring.del_key(TEST_KEY)
|
||||
except ValueError:
|
||||
@@ -122,10 +117,13 @@ class test_keyring:
|
||||
See if a key is available
|
||||
"""
|
||||
kernel_keyring.add_key(TEST_KEY, TEST_VALUE)
|
||||
assert kernel_keyring.has_key(TEST_KEY) # noqa
|
||||
|
||||
result = kernel_keyring.has_key(TEST_KEY)
|
||||
assert(result == True)
|
||||
kernel_keyring.del_key(TEST_KEY)
|
||||
assert not kernel_keyring.has_key(TEST_KEY) # noqa
|
||||
|
||||
result = kernel_keyring.has_key(TEST_KEY)
|
||||
assert(result == False)
|
||||
|
||||
def test_07(self):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user