diff options
author | Nick Mathewson <nickm@torproject.org> | 2010-07-25 15:13:04 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2010-07-25 16:57:24 -0400 |
commit | bbb6cb5fe6a61aa0975dcd9df11f9f648f6abba2 (patch) | |
tree | c97f164ecc7811ef3d6ba07d51a8c05a695d222d /lib/thandy/tests.py | |
parent | 5f2d07ce78e6443592f84a803fe2adced49ada39 (diff) |
More unit tests and documentation for the Thandy code
Diffstat (limited to 'lib/thandy/tests.py')
-rw-r--r-- | lib/thandy/tests.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/thandy/tests.py b/lib/thandy/tests.py index a46258d..e55c07d 100644 --- a/lib/thandy/tests.py +++ b/lib/thandy/tests.py @@ -68,6 +68,7 @@ class CryptoTests(unittest.TestCase): ks = thandy.keys.KeyStore(fname) key1 = thandy.keys.RSAKey.generate(512) key2 = thandy.keys.RSAKey.generate(512) + key1.addRole('master', '**') ks.addKey(key1) ks.addKey(key2) ks.save(passwd) @@ -75,6 +76,7 @@ class CryptoTests(unittest.TestCase): ks2 = thandy.keys.KeyStore(fname) ks2.load(passwd) self.assertEquals(key1.key.n, ks2.getKey(key1.getKeyID()).key.n) + self.assertEquals(key1.getRoles(), [("master", "**")]) class UtilTests(unittest.TestCase): def setUp(self): |