Ejemplo n.º 1
0
def libmgr_cfg_mgr_dev_default_test():
  lcd = LibCfg(LibCfg.CREATE_MODE_OFF, 1, LibCfg.EXPUNGE_MODE_NO_MEM)
  lmc = LibMgrCfg(dev_default=lcd)
  assert lmc.get_dev_cfg("bla.device") == lcd
  lc = LibCfg(LibCfg.CREATE_MODE_OFF, 1, LibCfg.EXPUNGE_MODE_NO_MEM)
  lmc.add_dev_cfg("bla.device", lc)
  assert lmc.get_dev_cfg("bla.device") == lc
Ejemplo n.º 2
0
def libmgr_cfg_mgr_dev_test():
    lmc = LibMgrCfg()
    lc = LibCfg(LibCfg.CREATE_MODE_OFF, 1, LibCfg.EXPUNGE_MODE_NO_MEM)
    lmc.add_dev_cfg("bla.device", lc)
    assert lmc.get_dev_cfg("bla.device") == lc
    assert lmc.get_dev_cfg("foo.device") == LibCfg()
    lc2 = LibCfg(LibCfg.CREATE_MODE_AMIGA, 11, LibCfg.EXPUNGE_MODE_NO_MEM)
    lmc.add_dev_cfg("foo.device", lc2)
    assert lmc.get_dev_cfg("foo.device") == lc2