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)
def test_choose_nonetwork(self): with testctx() as tmpdir: ouimgr = OuiMgr(tmpdir) cache = Random.cache() ouimgr.save(cache) smokechoice(self,ouimgr.choose())