Change __init__ import and rename test

This commit is contained in:
Raimon Esteve 2017-04-19 17:27:09 +02:00
parent 89d2f1876d
commit 6c1514efde
4 changed files with 15 additions and 21 deletions

View File

@ -1,16 +1,16 @@
# The COPYRIGHT file at the top level of this repository contains the full
# copyright notices and license terms.
from trytond.pool import Pool
from .account import *
from . import account
def register():
Pool.register(
AccountImportContaplusStart,
ImportRecord,
Move,
Invoice,
account.AccountImportContaplusStart,
account.ImportRecord,
account.Move,
account.Invoice,
module='account_import_contaplus', type_='model')
Pool.register(
AccountImportContaplus,
account.AccountImportContaplus,
module='account_import_contaplus', type_='wizard')

View File

@ -9,10 +9,8 @@ from trytond.pool import Pool, PoolMeta
from trytond.wizard import Wizard, StateTransition, StateView, Button
from trytond.transaction import Transaction
__all__ = [
'AccountImportContaplus', 'AccountImportContaplusStart', 'ImportRecord',
'Move', 'Invoice'
]
__all__ = ['AccountImportContaplus', 'AccountImportContaplusStart',
'ImportRecord', 'Move', 'Invoice']
logger = logging.getLogger(__name__)

View File

@ -12,7 +12,9 @@
<field name="name">Import Contaplus File</field>
<field name="wiz_name">account.import.contaplus</field>
</record>
<!-- Menus -->
<menuitem action="wizard_account_import_contaplus" id="menu_account_import_contaplus" parent="account.menu_account" sequence="1" name="Import Contaplus File"/>
<menuitem action="wizard_account_import_contaplus" id="menu_account_import_contaplus"
parent="account.menu_account" sequence="1" name="Import Contaplus File"/>
</data>
</tryton>

View File

@ -1,15 +1,12 @@
# The COPYRIGHT file at the top level of this repository contains the full
# copyright notices and license terms.
import unittest
# import doctest
import trytond.tests.test_tryton
from trytond.tests.test_tryton import test_view, test_depends
# TODO: Remove if no sceneario needed.
# from trytond.tests.test_tryton import doctest_setup, doctest_teardown
class TestCase(unittest.TestCase):
'Test module'
class AccountImportContaplusTestCase(unittest.TestCase):
'Test Account Import Contaplus module'
def setUp(self):
trytond.tests.test_tryton.install_module('account_import_contaplus')
@ -25,9 +22,6 @@ class TestCase(unittest.TestCase):
def suite():
suite = trytond.tests.test_tryton.suite()
suite.addTests(unittest.TestLoader().loadTestsFromTestCase(TestCase))
# TODO: remove if no scenario needed.
#suite.addTests(doctest.DocFileSuite('scenario_account_import_contaplus.rst',
# setUp=doctest_setup, tearDown=doctest_teardown, encoding='utf-8',
# optionflags=doctest.REPORT_ONLY_FIRST_FAILURE))
suite.addTests(unittest.TestLoader().loadTestsFromTestCase(
AccountImportContaplusTestCase))
return suite