def test_from_list(self): baz_man = JSONObject("baz man!") lst = [JSONObject("foo"), JSONObject("bar"), baz_man] data = JSONObjectDict.from_list(lst) self.failUnlessEqual(len(data), len(lst)) self.failUnless("baz man!" in data) self.failUnlessEqual(baz_man, data["baz man!"])
def test_from_list(self): baz_man = JSONObject("baz man!") lst = [JSONObject("foo"), JSONObject("bar"), baz_man] data = JSONObjectDict.from_list(lst) self.failUnlessEqual(len(data), len(lst)) self.failUnless("baz man!" in data) self.failUnlessEqual(baz_man, data["baz man!"])
def setUp(self): module = self.modules["CustomCommands"] globals().update(vars(module)) self.plugin = self.plugins["CustomCommands"].cls config.init() self.cmd_list = CustomCommands.DEFAULT_COMS self.commands = JSONObjectDict.from_list(self.cmd_list)
def setUp(self): module = self.modules["CustomCommands"] globals().update(vars(module)) self.plugin = self.plugins["CustomCommands"].cls config.init() self.cmd_list = CustomCommands.DEFAULT_COMS self.commands = JSONObjectDict.from_list(self.cmd_list)
def __finish(self, widget): # TODO: Warn about impending deletion of nameless items, or something all = JSONObjectDict.from_list( [row[0] for row in self.model if row[0].name]) all.save(filename=self.filename)
def __finish(self, widget): # TODO: Warn about impending deletion of nameless items, or something all = JSONObjectDict.from_list( [row[0] for row in self.model if row[0].name]) all.save(filename=self.filename)
def setUp(self): globals().update(vars(self.modules["CustomCommands"])) config.init() self.cmd_list = CustomCommands.DEFAULT_COMS self.commands = JSONObjectDict.from_list(self.cmd_list)
def setUp(self): globals().update(vars(self.modules["CustomCommands"])) config.init() self.cmd_list = CustomCommands.DEFAULT_COMS self.commands = JSONObjectDict.from_list(self.cmd_list)