summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGery Debongnie <ged@openerp.com>2014-01-23 11:56:38 +0100
committerGery Debongnie <ged@openerp.com>2014-01-23 11:56:38 +0100
commit74fd48e60825ab2b4bc2b923ab210db2ff207c56 (patch)
tree97b9109e9a79ff8a35b5744bb12726c0af552f57
parent74386a5bb95cb5a241b4fe29e5736e5a1cc93dea (diff)
[FIX] fixes the read_group by dates tests (makes them use the field:interval syntax instead of using the context (test_orm.py)
bzr revid: ged@openerp.com-20140123105638-l4ej76ynf4avcjma
-rw-r--r--openerp/tests/test_orm.py13
1 files changed, 1 insertions, 12 deletions
diff --git a/openerp/tests/test_orm.py b/openerp/tests/test_orm.py
index 9e2a9c4a65f..0f685e292a7 100644
--- a/openerp/tests/test_orm.py
+++ b/openerp/tests/test_orm.py
@@ -131,18 +131,7 @@ class TestORM(common.TransactionCase):
else:
domain = main_domain
- display_format, groupby_format = {
- 'year': ('YYYY', 'yyyy'),
- 'month': ('YYYY-MM', 'yyyy-mm'),
- 'day': ('yyyy-MM-dd', 'yyyy-mm-dd'),
- }[interval]
-
- datetime_format = {
- 'date': dict(interval=interval, display_format=display_format, groupby_format=groupby_format)
- }
- context = dict(datetime_format=datetime_format)
-
- rg = self.partner.read_group(self.cr, self.uid, domain, ['date'], 'date', context=context)
+ rg = self.partner.read_group(self.cr, self.uid, domain, ['date'], 'date' + ':' + interval)
result = {}
for r in rg:
result[r['date']] = set(self.partner.search(self.cr, self.uid, r['__domain']))