Improve assertion in test
As a follow up from comments at https://review.openstack.org/#/c/412083, this patch adds a new assertion to improve the validation in the test. Change-Id: Ib8dd06a2098730a58dc2a3015dae67cd58fb5eb3 Co-Authored-By: Lance Bragstad <lbragstad@gmail.com>
This commit is contained in:
parent
efb58750f3
commit
54dc0868d9
|
@ -683,6 +683,11 @@ class TestFernetKeyRotation(unit.TestCase):
|
|||
|
||||
|
||||
class TestLoadKeys(unit.TestCase):
|
||||
|
||||
def assertValidFernetKey(self, keys):
|
||||
self.assertGreater(len(keys[0]), 0)
|
||||
self.assertIsInstance(keys[0], str)
|
||||
|
||||
def test_non_numeric_files(self):
|
||||
self.useFixture(
|
||||
ksfixtures.KeyRepository(
|
||||
|
@ -700,4 +705,4 @@ class TestLoadKeys(unit.TestCase):
|
|||
)
|
||||
keys = key_utils.load_keys()
|
||||
self.assertEqual(2, len(keys))
|
||||
self.assertGreater(len(keys[0]), 0)
|
||||
self.assertValidFernetKey(keys)
|
||||
|
|
Loading…
Reference in New Issue