0

I seted the config data like db_name in setUp()

def setUp(self):
  config = tools.config
  config['db_name'] = 'test'
  config['db_user'] = 'admin'
  ...

and got a "AttributeError: environments" for "return cls._local.environments" in setUp() super

int_tow
  • 73
  • 6

1 Answers1

1

I must say I haven't really used odoo to know what it needs configured, but apparently there's a pytest plugin for it:

https://pypi.python.org/pypi/pytest-odoo

So, my suggestion would be to try to use pytest instead of unittest.TestCase along with that plugin (which should take care of making the proper setup) -- the only thing in PyDev in this case is ask it to use the pytest runner (see: http://www.pydev.org/manual_adv_pyunit.html for details on how to configure that).

Fabio Zadrozny
  • 24,814
  • 4
  • 66
  • 78