[TEST] update test for resource interval_hours_get()
authorXavier ALT <xal@openerp.com>
Tue, 30 Oct 2012 20:55:14 +0000 (21:55 +0100)
committerXavier ALT <xal@openerp.com>
Tue, 30 Oct 2012 20:55:14 +0000 (21:55 +0100)
  Change test from ">" to ">=" 27, as we now have a correct calculation
  we will get exactly 27 hours for 'resource_developer' if test is done
  after 18h00 (5 working day of 9 hours, minus Monday - not included in
  interval as dt_from after working hours, minus Thursday - leave day)

bzr revid: xal@openerp.com-20121030205514-gyf925370alc9lf8

addons/resource/test/resource.yml

index 5b7fa10..bce6715 100644 (file)
@@ -45,7 +45,7 @@
     dt_from = now - timedelta(days=now.weekday()) 
     dt_to = dt_from+ timedelta(days=6) 
     hours = self.interval_hours_get(cr, uid, ref('timesheet_group1'), dt_from, dt_to, resource=ref('resource_developer'))
-    assert hours > 27 , 'Invalid Total Week working hour calculated'
+    assert hours >= 27 , 'Invalid Total Week working hour calculated'
 -
   Project Analysis work is of 20 hours which will start from Week start so i will calculate working schedule for resource Analyst for the same.
 -