def test_load_template_json(self): init_loader.load_init_data("../database/init.json") loader = item_loader.ItemLoader() data = json.loads(loader.load_template_json("not a type name")) self.assertEqual(data["title"], "New Item") data = json.loads(loader.load_template_json("item")) self.assertEqual(data["title"], "New Item")
def test_load_item_type(self): init_loader.load_init_data("../database/init.json") loader = item_loader.ItemLoader() type_item = loader.load_type("item") self.assertEqual("/system/types/item", type_item.handle.path) self.assertIsNotNone(type_item) self.assertEqual(str(type_item.handle.item_id), type_item.type_path) # Some intermediate ids are cached in loader, so do this twice type_item = loader.load_type("item") self.assertIsNotNone(type_item) self.assertEqual(str(type_item.handle.item_id), type_item.type_path) self.assertEqual("/system/types/item", type_item.handle.path)
def setUp(self): dbgw.reset() init_loader.load_init_data("../database/init.json")
def load_init_data(self): init_data_path = "database/init.json" load_init_data(init_data_path)
def setUpClass(cls): dbgw.reset() init_loader.load_init_data("../database/init.json")
def test_load_init_data(self): init_loader.load_init_data("../database/init.json") pass
def setUp(cls): dbgw.reset() init_loader.load_init_data("../database/init.json") init_loader.load_init_data("data/user_item_tests.json")
def setUp(self): dbgw.reset() init_loader.load_init_data("../database/init.json") init_loader.load_init_data("data/saver_tests.json")