def test_confirm(self):
     editor = AccountEditor(self.store)
     self.assertFalse(editor.validate_confirm())
     editor.description.update('Account name')
     self.assertTrue(editor.validate_confirm())
     editor.main_dialog.confirm()
     self.check_editor(editor, 'editor-account-confirm', [editor.retval])
 def test_show_santander(self):
     account = self.create_account()
     account.account_type = Account.TYPE_BANK
     editor = AccountEditor(self.store, account)
     editor.bank_type.select_item_by_data(33)
     self.assertFalse(editor.parent_accounts.get_account_by_id(account.id))
     self.check_editor(editor, 'editor-account-show-santander')
 def test_show_banco_do_brasil(self):
     account = self.create_account()
     account.account_type = Account.TYPE_BANK
     editor = AccountEditor(self.store, account)
     editor.bank_type.select_item_by_data(1)
     self.assertFalse(editor.parent_accounts.get_account_by_id(account.id))
     self.check_editor(editor, 'editor-account-show-banco-do-brasil')
 def test_show(self):
     account = self.create_account()
     editor = AccountEditor(self.store, account)
     # Created account must not be in accounts tree of editor.
     self.assertFalse(editor.parent_accounts.get_account_by_id(account.id))
     self.check_editor(editor, 'editor-account-show')
 def test_create(self):
     editor = AccountEditor(self.store)
     self.check_editor(editor, 'editor-account-create')