示例#1
0
 def test_choose_network(self):
   with testctx() as tmpdir:
     ouimgr = OuiMgr(tmpdir)
     # This will kick off a network fetch.
     smokechoice(self,ouimgr.choose())
     smokecache(self,ouimgr.cache)
     # Make sure we can load back the parsed result of the network
     # fetch from disk.
     ouimgr = OuiMgr(tmpdir)
     smokechoice(self,ouimgr.choose())
     smokecache(self,ouimgr.cache)
示例#2
0
 def test_choose_nonetwork(self):
   with testctx() as tmpdir:
     ouimgr = OuiMgr(tmpdir)
     cache = Random.cache()
     ouimgr.save(cache)
     smokechoice(self,ouimgr.choose())