diff --git a/CHANGES.rst b/CHANGES.rst index 66f5ceaa..b1b04c02 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -10,7 +10,11 @@ This changelog displays timelines for the two recipes anybox.recipe.odoo 1.9.3 (UNRELEASED) ------------------------------------- -- +- github #90: PyChart special cases no longer needed +- github #93: Empty log file from upgrade_script +- github #88: Support from Odoo 8.0 to odoo 10.0 +- github #110: Odoo 11.0 RegistryManager is removed +- github #108: Python3 compatibility (Odoo 11.0) anybox.recipe.odoo 1.9.2 (2016-09-20) ------------------------------------- diff --git a/anybox/recipe/odoo/testing.py b/anybox/recipe/odoo/testing.py index e8a78d65..61193e70 100644 --- a/anybox/recipe/odoo/testing.py +++ b/anybox/recipe/odoo/testing.py @@ -119,6 +119,30 @@ def uncommitted_changes(self): vcs.SUPPORTED['pr_fakevcs'] = PersistentRevFakeRepo +class AttrDict(object): + def __init__(self, init=None): + if init is not None: + self.__dict__.update(init) + + def __getitem__(self, key): + return self.__dict__[key] + + def __setitem__(self, key, value): + self.__dict__[key] = value + + def __delitem__(self, key): + del self.__dict__[key] + + def __contains__(self, key): + return key in self.__dict__ + + def __len__(self): + return len(self.__dict__) + + def __repr__(self): + return repr(self.__dict__) + + class RecipeTestCase(unittest.TestCase): """A base setup for tests of recipe classes""" @@ -132,7 +156,7 @@ def setUp(self): os.mkdir(eggs_dir) develop_dir = os.path.join(b_dir, 'develop-eggs') os.mkdir(develop_dir) - self.buildout = {} + self.buildout = AttrDict() self.buildout['buildout'] = { 'directory': b_dir, 'offline': False,