Hi,
We are currently fixing all our test cases, and we faced a strange
problem and I would like to know if somebody has encoutered it before.
There is a tests scenario [1], which passing correctly when run alone
but is failing when we run the test suite with all the modules
(currently 900 tests). The failing traceback is the following:
Traceback (most recent call last):
File "/usr/lib/python2.7/doctest.py", line 2226, in runTest
raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for
scenario_account_invoice_party_currency.rst
File
"/home/sergi/nan/projectes/virtualenv/tests/trytond/trytond/modules/account_invoice_party_currency/tests/scenario_account_invoice_party_currency.rst",
line 0
----------------------------------------------------------------------
File
"/home/sergi/nan/projectes/virtualenv/tests/trytond/trytond/modules/account_invoice_party_currency/tests/scenario_account_invoice_party_currency.rst",
line 208, in scenario_account_invoice_party_currency.rst
Failed example:
Wizard('purchase.request.create').execute('create_')
Exception raised:
Traceback (most recent call last):
File "/usr/lib/python2.7/doctest.py", line 1315, in __run
compileflags, 1) in test.globs
File "<doctest
scenario_account_invoice_party_currency.rst[118]>", line 1, in <module>
Wizard('purchase.request.create').execute('create_')
File
"/home/sergi/nan/projectes/virtualenv/tests/proteus/proteus/__init__.py", line
951, in execute
ctx)
File
"/home/sergi/nan/projectes/virtualenv/tests/proteus/proteus/config.py",
line 146, in __call__
result = rpc.result(meth(*args, **kwargs))
File
"/home/sergi/nan/projectes/virtualenv/tests/trytond/trytond/wizard/wizard.py",
line 225, in execute
return wizard._execute(state_name)
File
"/home/sergi/nan/projectes/virtualenv/tests/trytond/trytond/wizard/wizard.py",
line 248, in _execute
action = state.get_action()
File
"/home/sergi/nan/projectes/virtualenv/tests/trytond/trytond/wizard/wizard.py",
line 142, in get_action
return Action.get_action_values(action.type, [action.id])[0]
File
"/home/sergi/nan/projectes/virtualenv/tests/trytond/trytond/model/modelstorage.py",
line 1160, in __getattr__
return super(ModelStorage, self).__getattr__(name)
File
"/home/sergi/nan/projectes/virtualenv/tests/trytond/trytond/model/model.py",
line 439, in __getattr__
% (self.__name__, name, self._values))
AttributeError: 'ir.action' Model has no attribute 'type': None
After a bit of testing, I was able to reproduce it running the tests of
this module and an the stock_reservation [2] ones. The stock_reservation
module also have two tests scenarios that also run the Create Purchase
Request Wizard. AFAIK doctests scenarios are independent from one an the
another, so I can not understand why we are having this issue. Have
anyone faced a similar problem? Any hints on how to investigate or solve it?
Thanks in advance.
[1]
https://bitbucket.org/nantic/trytond-account_invoice_party_currency/src/bf2010403497116493200a8101c80840cd64602a/tests/scenario_account_invoice_party_currency.rst?at=default
[2] https://bitbucket.org/nantic/trytond-stock_reservation/src
--
Sergi Almacellas Abellana
www.koolpi.com
Twitter: @pokoli_srk