def test_UidDefault(self): from hackpage.utils import changeUidWithDialog Tester.dialogTester.appendOk() uid_old = self.application.pageUidDepot.createUid(self.testPage) changeUidWithDialog(self.testPage, self.application) uid_new = self.application.pageUidDepot.createUid(self.testPage) self.assertEqual(uid_old, uid_new) self.assertEqual(Tester.dialogTester.count, 0)
def test_change_uid_02(self): from hackpage.utils import changeUidWithDialog uid = ' dsfsfsfssg ' Tester.dialogTester.append(self._setValue, uid) changeUidWithDialog(self.testPage, self.application) uid_new = self.application.pageUidDepot.createUid(self.testPage) self.assertEqual(Tester.dialogTester.count, 0) self.assertEqual(uid_new, uid.strip())
def __onChangePageUIDPopupClick(self, event): assert self._selectedPage is not None changeUidWithDialog(self._selectedPage, self._application) self._unbindPopupMenu() self._selectedPage = None
def run(self, params): changeUidWithDialog(self._application.selectedPage, self._application)