From bbb6cb5fe6a61aa0975dcd9df11f9f648f6abba2 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Sun, 25 Jul 2010 15:13:04 -0400 Subject: More unit tests and documentation for the Thandy code --- lib/thandy/tests.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/thandy/tests.py') 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): -- cgit v1.2.3