Back to index

obnam  1.1
Public Member Functions | Public Attributes
obnamlib.encryption_tests.SymmetricKeyCacheTests Class Reference

List of all members.

Public Member Functions

def setUp
def test_does_not_have_key_initially
def test_remembers_key
def test_does_not_remember_key_for_different_repo
def test_remembers_keys_for_both_repos
def test_clears_cache

Public Attributes

 cache
 repo
 repo2
 toplevel
 key
 key2

Detailed Description

Definition at line 65 of file encryption_tests.py.


Member Function Documentation

Definition at line 67 of file encryption_tests.py.

00067 
00068     def setUp(self):
00069         self.cache = obnamlib.SymmetricKeyCache()
00070         self.repo = 'repo'
00071         self.repo2 = 'repo2'
00072         self.toplevel = 'toplevel'
00073         self.key = 'key'
00074         self.key2 = 'key2'
        

Definition at line 92 of file encryption_tests.py.

00092 
00093     def test_clears_cache(self):
00094         self.cache.put(self.repo, self.toplevel, self.key)
00095         self.cache.clear()
00096         self.assertEqual(self.cache.get(self.repo, self.toplevel), None)
00097 

Definition at line 75 of file encryption_tests.py.

00075 
00076     def test_does_not_have_key_initially(self):
00077         self.assertEqual(self.cache.get(self.repo, self.toplevel), None)
        

Definition at line 82 of file encryption_tests.py.

00082 
00083     def test_does_not_remember_key_for_different_repo(self):
00084         self.cache.put(self.repo, self.toplevel, self.key)
00085         self.assertEqual(self.cache.get(self.repo2, self.toplevel), None)
        

Definition at line 78 of file encryption_tests.py.

00078 
00079     def test_remembers_key(self):
00080         self.cache.put(self.repo, self.toplevel, self.key)
00081         self.assertEqual(self.cache.get(self.repo, self.toplevel), self.key)

Definition at line 86 of file encryption_tests.py.

00086 
00087     def test_remembers_keys_for_both_repos(self):
00088         self.cache.put(self.repo, self.toplevel, self.key)
00089         self.cache.put(self.repo2, self.toplevel, self.key2)
00090         self.assertEqual(self.cache.get(self.repo, self.toplevel), self.key)
00091         self.assertEqual(self.cache.get(self.repo2, self.toplevel), self.key2)


Member Data Documentation

Definition at line 68 of file encryption_tests.py.

Definition at line 72 of file encryption_tests.py.

Definition at line 73 of file encryption_tests.py.

Definition at line 69 of file encryption_tests.py.

Definition at line 70 of file encryption_tests.py.

Definition at line 71 of file encryption_tests.py.


The documentation for this class was generated from the following file: