Browse Source

[IMP] use relative imports in tests

It's cleaner and makes pydev happy
pull/86/head
Stéphane Bidoul 10 years ago
parent
commit
2623c8c113
  1. 16
      mis_builder/tests/mis_builder_test.py

16
mis_builder/tests/mis_builder_test.py

@ -22,10 +22,12 @@
#
##############################################################################
import openerp.tests.common as common
from openerp.addons.mis_builder import models
from collections import OrderedDict
import openerp.tests.common as common
from ..models import mis_builder
DB = common.DB
ADMIN_USER_ID = common.ADMIN_USER_ID
@ -38,19 +40,19 @@ class mis_builder_test(common.TransactionCase):
def test_datetime_conversion(self):
date_to_convert = '2014-07-05'
date_time_convert = models.mis_builder._utc_midnight(
date_time_convert = mis_builder._utc_midnight(
date_to_convert, 'Europe/Brussels')
self.assertEqual(date_time_convert, '2014-07-04 22:00:00',
'The converted date time convert must contains hour')
date_time_convert = models.mis_builder._utc_midnight(
date_time_convert = mis_builder._utc_midnight(
date_to_convert, 'Europe/Brussels', add_day=1)
self.assertEqual(date_time_convert, '2014-07-05 22:00:00',
'The converted date time convert must contains hour')
date_time_convert = models.mis_builder._utc_midnight(
date_time_convert = mis_builder._utc_midnight(
date_to_convert, 'US/Pacific')
self.assertEqual(date_time_convert, '2014-07-05 07:00:00',
'The converted date time convert must contains hour')
date_time_convert = models.mis_builder._utc_midnight(
date_time_convert = mis_builder._utc_midnight(
date_to_convert, 'US/Pacific', add_day=1)
self.assertEqual(date_time_convert, '2014-07-06 07:00:00',
'The converted date time convert must contains hour')
@ -79,4 +81,4 @@ class mis_builder_test(common.TransactionCase):
})])
}, data)
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
Loading…
Cancel
Save