Em 01/04/2014 17:28, Iasmini - Gmail escreveu:
Em 12/03/2014 16:27, Iasmini - Gmail escreveu:
-------- Mensagem original --------
Assunto: Re: [tryton] KeyError on unit test
Data: Tue, 11 Mar 2014 15:43:33 +0100
De: Jean C <[email protected]>
Responder a: [email protected]
Para: [email protected]
Is there a chance you registered your models under the wrong module
name ?
Jean Cavallo
/Coopengo/
It was an error in file tests/__init__.py
Thank you.
--
Iasmini Gomes
Sílex Sistemas
www.silexsistemas.com.br
I've corrected the file tests/__init__.py, but the error continued:
__init__.py:
from .test_nfse_br import suite
======================================================================
ERROR: test0010create_invoice (__main__.TestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/opt/silex/tryton/nfse_br/tests/test_nfse_br.py", line 61, in
test0010create_invoice
'legal_type': LEGAL_TYPE_DIC['juridica']['id']
File "/opt/trytond/trytond/model/modelsql.py", line 336, in create
field = cls._fields[fname]
KeyError: 'optante_simples'
----------------------------------------------------------------------
Ran 3 tests in 77.108s
FAILED (errors=1)
Process finished with exit code 0
--
Iasmini Gomes
Sílex Sistemas
www.silexsistemas.com.br
Yesterday it was raising the error above.
Today, I cloned tryton and trytond, ran *./trytond -d database -u all*
and now when I try to run the test it's raising the error bellow. I
tried to execute test_account and it raises the same error. I'm getting
use Tryton normally.
/usr/bin/python2.7 /opt/silex/tryton/work_order/tests/test_work_order.py
No handlers could be found for logger "party"
/opt/trytond/trytond/modules/real_estate/real_estate.py:74:
DeprecationWarning: on_change argument is deprecated, use the depends
decorator
on_change=['country', 'subdivision'])
/opt/trytond/trytond/modules/real_estate/real_estate.py:171:
DeprecationWarning: on_change_with argument is deprecated, use the
depends decorator
on_change_with=['description']), 'on_change_with_summary')
/opt/trytond/trytond/modules/account_br/product.py:41:
DeprecationWarning: on_change argument is deprecated, use the depends
decorator
'invisible': Eval('type', 'service') != 'service',
/opt/trytond/trytond/modules/account_br/product.py:48:
DeprecationWarning: on_change argument is deprecated, use the depends
decorator
'invisible': Eval('type', 'service') != 'service',
/opt/trytond/trytond/modules/work_order/work_order.py:48:
DeprecationWarning: on_change argument is deprecated, use the depends
decorator
serial_number = fields.Char('Serial Number', required=False,
on_change=['serial_number', 'product', 'code'])
/opt/trytond/trytond/modules/work_order/work_order.py:51:
DeprecationWarning: on_change argument is deprecated, use the depends
decorator
on_change=['serial_number', 'product', 'code'])
/opt/trytond/trytond/modules/work_order/work_order.py:70:
DeprecationWarning: on_change argument is deprecated, use the depends
decorator
on_change=['items'])
/opt/trytond/trytond/modules/work_order/work_order.py:225:
DeprecationWarning: on_change argument is deprecated, use the depends
decorator
on_change=['product', 'unit_price', 'quantity', 'discount',
'work_order'])
/opt/trytond/trytond/modules/work_order/work_order.py:237:
DeprecationWarning: on_change_with argument is deprecated, use the
depends decorator
on_change_with=['quantity', 'unit_price', 'discount']), 'get_amount')
/opt/trytond/trytond/modules/nfse_br/invoice.py:29: DeprecationWarning:
on_change argument is deprecated, use the depends decorator
on_change=['identificacao_ambiente', 'serie'])
/opt/trytond/trytond/modules/nfse_br/invoice.py:389: DeprecationWarning:
on_change argument is deprecated, use the depends decorator
depends=['type'])
/opt/trytond/trytond/modules/nfse_br/invoice.py:399: DeprecationWarning:
on_change_with argument is deprecated, use the depends decorator
depends=['type', 'currency_digits']), 'get_amount')
/opt/trytond/trytond/modules/nfse_br/invoice.py:405: DeprecationWarning:
on_change argument is deprecated, use the depends decorator
on_change=['country', 'subdivision'], required=True
/opt/trytond/trytond/modules/nfse_br/invoice.py:409: DeprecationWarning:
on_change argument is deprecated, use the depends decorator
on_change=['subdivision', 'municipio'], required=True
Traceback (most recent call last):
File "/opt/silex/tryton/work_order/tests/test_work_order.py", line 4,
in <module>
import trytond.tests.test_tryton
File "/opt/trytond/trytond/tests/test_tryton.py", line 25, in <module>
DB_NAME = os.environ['DB_NAME']
File "/usr/lib/python2.7/UserDict.py", line 23, in __getitem__
raise KeyError(key)
KeyError: 'DB_NAME'
--
Iasmini Gomes
Sílex Sistemas
www.silexsistemas.com.br
---
Este email está limpo de vírus e malwares porque a proteção do avast! Antivírus
está ativa.
http://www.avast.com