예제 #1
0
파일: test_oui.py 프로젝트: pennello/macgen
 def test_save(self):
   with testctx() as tmpdir:
     ouimgr = OuiMgr(tmpdir)
     cache = Random.cache()
     ouimgr.save(cache)
     x = ouimgr.load()
     smokecache(self,x)
     self.assertEquals(x,cache)
예제 #2
0
파일: test_oui.py 프로젝트: pennello/macgen
 def test_expire(self):
   with testctx() as tmpdir:
     ouimgr = OuiMgr(tmpdir)
     cache = Random.cache()
     ouimgr.save(cache)
     # Let it expire.
     time.sleep(shortthresh + 1)
     self.assertIs(ouimgr.load(),None)
예제 #3
0
파일: test_oui.py 프로젝트: pennello/macgen
 def test_load(self):
   with testctx() as tmpdir:
     ouimgr = OuiMgr(tmpdir)
     self.assertIs(ouimgr.load(),None)