File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,23 @@ def tearDown(self):
2020 if os .path .exists (config .DATABASE ):
2121 shutil .rmtree (config .DATABASE )
2222
23+ def testList (self ):
24+ self .sessions .list ()
25+ self .sessions .set ('random_key' , text = 'hello, world!' )
26+ self .sessions .list ()
27+
28+ def testGetAll (self ):
29+ self .sessions .set ('random_key' , text = 'hello, world!' )
30+ self .assertEqual (self .sessions .getall ('random_key' ),
31+ {'text' : 'hello, world!' })
32+
33+ def testDestroy (self ):
34+ self .sessions .set ('random_key' , text = 'hello, world!' )
35+ self .assertEquals (self .sessions .getall ('random_key' ),
36+ {'text' : 'hello, world!' })
37+ self .sessions .destroy ('random_key' )
38+ self .assertRaises (KeyError , self .sessions .getall , 'random_key' )
39+
2340 def testSetSession (self ):
2441 self .sessions .set ('random_key' , text = 'hello, world!' )
2542 self .assertEqual (self .sessions .get ('random_key' , 'text' ),
You can’t perform that action at this time.
0 commit comments