예제 #1
0
 def test_confirm(self):
     editor = PaulistaInvoiceDialog(self.store, model=None)
     with mock.patch('plugins.ecf.paulistainvoicedialog.info') as info:
         self.click(editor.main_dialog.ok_button)
         info.assert_called_once_with('The CPF cannot be empty')
예제 #2
0
 def test_on_document__validate_cpf(self):
     editor = PaulistaInvoiceDialog(self.store, model=None)
     editor.document.update(u"123.123.123-12")
     self.assertInvalid(editor, ['document'])
예제 #3
0
 def test_on_document__validate_cnpj(self):
     editor = PaulistaInvoiceDialog(self.store, model=None)
     self.click(editor.cnpj)
     editor.document.update(u"11.222.333/4444-55")
     self.assertInvalid(editor, ['document'])
예제 #4
0
    def test_show(self):
        editor = PaulistaInvoiceDialog(self.store, model=None)
        self.check_editor(editor, 'editor-paulista-invoice-cpf-show')

        self.click(editor.cnpj)
        self.check_editor(editor, 'editor-paulista-invoice-cnpj-show')