def setUp(self): SuperTestCase.check_application_for_test() packageStore = PackageStore() package = packageStore.createPackage() n0 = package.root # 00 n1 = n0.createChild() # |_01 n2 = n1.createChild() # | |_02 n3 = n2.createChild() # | | |_03 n4 = n3.createChild() # | | | |_04 n5 = n2.createChild() # | | |_05 n6 = n2.createChild() # | | |_06 n7 = n1.createChild() # | |_07 n8 = n1.createChild() # | |_08 n9 = n0.createChild() # |_09 n10 = n0.createChild() # |_10 globals().update(locals()) # Make all local vars global for easy access
def setUp(self): SuperTestCase.check_application_for_test() packageStore = PackageStore() package = packageStore.createPackage() n0 = package.root # 00 n1 = n0.createChild() # |_01 n2 = n1.createChild() # | |_02 n3 = n2.createChild() # | | |_03 n4 = n3.createChild() # | | | |_04 n5 = n2.createChild() # | | |_05 n6 = n2.createChild() # | | |_06 n7 = n1.createChild() # | |_07 n8 = n1.createChild() # | |_08 n9 = n0.createChild() # |_09 n10 = n0.createChild() # |_10 globals().update( locals()) # Make all local vars global for easy access
def testSaveAndLoad(self): packageStore = PackageStore() package = packageStore.createPackage() # Check that it has been given a default name self.assertEquals(package.name, "newPackage") package.author = "UoA" package.description = "Nice test package" Config._getConfigPathOptions = lambda s: ['exe.conf'] config = Config() SuperTestCase.update_config_parser(config.configParser) config.loadSettings() filePath = config.dataDir/'package1.elp' package.save(filePath) package1 = Package.load(filePath) self.assert_(package1) self.assertEquals(package1.author, "UoA") self.assertEquals(package1.description, "Nice test package") # Package name should have been set when it was saved self.assertEquals(package.name, "package1") self.assertEquals(package1.name, "package1")
def setUp(self): SuperTestCase.setUp(self) self.packageStore = self.app.packageStore
def setUp(self): SuperTestCase.check_application_for_test() packageStore = PackageStore() self.package = packageStore.createPackage()