def testNewSheetRightOf(self): rightOfName = MASTER_LIST_SHEET_NAME name = 'test sheet' sheet = Sheet.newSheetRightOf(rightOfName, name) self.assertEqual(sheet.getName(), name) names = Context.getDocument().Sheets.getElementNames() index = names.index(rightOfName) self.assertEqual(names.index(name), index + 1)
def testNewSheetRightOfWithWrongName(self): rightOfName = 'fail' self.assertEqual(Sheet.newSheetRightOf(rightOfName, 'will fail'), None)