[IMP]project_gtd: improvement in yml
authorHemendra Paregi (Open ERP) <hpa@tinyerp.com>
Mon, 28 Nov 2011 05:20:04 +0000 (10:50 +0530)
committerHemendra Paregi (Open ERP) <hpa@tinyerp.com>
Mon, 28 Nov 2011 05:20:04 +0000 (10:50 +0530)
bzr revid: hpa@tinyerp.com-20111128052004-cv0w7uty6d99cehh

addons/project_gtd/__openerp__.py
addons/project_gtd/test/gtd_test.yml [deleted file]
addons/project_gtd/test/task_timebox.yml [new file with mode: 0644]
addons/project_gtd/test/timebox.yml [deleted file]

index 42ac851..82e3f4f 100644 (file)
@@ -57,8 +57,7 @@ performing those tasks.
     ],
     'demo_xml': ['project_gtd_demo.xml'],
     'test':[
-        #'test/gtd_test.yml',
-         'test/timebox.yml'
+         'test/task_timebox.yml'
     ],
     'installable': True,
     'active': False,
diff --git a/addons/project_gtd/test/gtd_test.yml b/addons/project_gtd/test/gtd_test.yml
deleted file mode 100644 (file)
index 0583bc7..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-- 
-  Create a task 'Develop time management module' with weekly timebox
-- 
-  !record {model: project.task, id: project_task_developtimemanagementmodule0}:
-    name: Develop time management module
-    planned_hours: 15.0
-    project_id: project.project_project_22
-    remaining_hours: 15.0
-    state: draft
-    timebox_id: project_gtd.timebox_weekly
-    
-    
-- 
-  Open the task
-- 
-  !python {model: project.task}: |
-    self.do_open(cr, uid, [ref("project_task_developtimemanagementmodule0")], {"lang":
-      "en_US", "project_id": False, "tz": False, "active_model": "ir.ui.menu",
-      "department_id": False, "section_id": False, "search_default_project_id":
-      False, "search_default_user_id": 1, "search_default_current": 1, "active_ids":
-      [ref("project.menu_action_view_task")], "active_id": ref("project.menu_action_view_task"),
-      })
-      
-- 
-  Create time box for next week
-- 
-  !record {model: project.gtd.timebox, id: project_gtd_timebox_nextweek0}:
-    name: Next Week
-    sequence: 0.0
-    
-- 
-  Create time box for tomorrow
-- 
-  !record {model: project.gtd.timebox, id: project_gtd_timebox_tomorrow1}:
-    name: Tomorrow
-    sequence: 0.0
-    
-- 
-  Planify the task from weekly timebox to tomorrow timebox
-- 
-  !record {model: project.timebox.fill.plan, id: project_timebox_fill_plan_0}:
-    task_ids:
-      - project_task_developtimemanagementmodule0
-    timebox_id: project_gtd.timebox_weekly
-    timebox_to_id: project_gtd_timebox_tomorrow1
-    
-    
-- 
-  Set the task to tomorrow timebox
-- 
-  !python {model: project.timebox.fill.plan}: |
-    self.process(cr, uid, [ref("project_timebox_fill_plan_0")], {"lang": "en_US",
-      "project_id": False, "tz": False, "active_model": "project.gtd.timebox",
-      "department_id": False, "section_id": False, "record_id": 1, "active_ids":
-      [ref("project_gtd.timebox_daily")], "active_id": ref("project_gtd.timebox_daily"),
-      })
-
--
-   Check if task set to tomorrow timebox
--
-   !assert {model: project.task, id: project_task_developtimemanagementmodule0, string: Task set to tomorrow timebox}:
-      - timebox_id.id == ref("project_gtd_timebox_tomorrow1")
-      
--
-   Empty Timebox for tomorrow
--
-   !python {model: project.timebox.empty}: |
-      self._empty(cr, uid,  {"lang": "en_US",
-      "project_id": False, "tz": False, "active_model": "project.gtd.timebox",
-      "department_id": False, "section_id": False, "record_id": 1, "active_ids":
-      [ref("project_gtd_timebox_tomorrow1")], "active_id": ref("project_gtd_timebox_tomorrow1"),
-      })
-           
--
-   Check task 'Develop time management module' is no more in tomorrow timebox
--
-   !assert {model: project.task, id: project_task_developtimemanagementmodule0, string: Task is not in tomorrow timebox}: 
-      - timebox_id.id != ref("project_gtd_timebox_tomorrow1")
diff --git a/addons/project_gtd/test/task_timebox.yml b/addons/project_gtd/test/task_timebox.yml
new file mode 100644 (file)
index 0000000..7379f58
--- /dev/null
@@ -0,0 +1,42 @@
+-
+  In order to set Daily tasks  into Weekly Timebox, I create plan for that
+-
+  !record {model: project.timebox.fill.plan, id: plan_id}:
+    task_ids: [project.project_task_10]
+    timebox_id: timebox_daily
+    timebox_to_id: timebox_weekly
+-
+  I run plan to set Daily tasks  into Weekly Timebox
+-
+  !python {model: project.timebox.fill.plan}: |
+    self.process(cr, uid, [ref("plan_id")])
+-
+  I check Weekly Timebox of task after set Timebox
+-
+  !assert {model: project.task, id: project.project_task_10, string: Task should be set to weekly timebox}:
+     - timebox_id.id == ref("timebox_weekly")
+-
+  I Empty the Daily Timebox
+-
+  !python {model: project.timebox.empty}: |
+      self._empty(cr, uid,  {"active_model": "project.gtd.timebox",
+      "active_ids":[ref("timebox_daily")],
+      "active_id": ref("timebox_daily"),
+      })
+-
+  I check task 'Develop time management module' is no more in Daily Timebox
+-
+  !assert {model: project.task, id: project.project_task_10 , string: Task is not in Daily Timebox}:
+     - timebox_id.id != ref("timebox_daily")
+-
+  I set Previous Timebox on task
+-
+  !python {model: project.task}: |
+     self.prev_timebox(cr, uid, [ref("project.project_task_10")],
+     {'active_ids': [ref("project.project_task_1")],})
+-
+  I set Next Timebox on task
+-
+  !python {model: project.task}: |
+      self.next_timebox(cr, uid, [ref("project.project_task_10")],
+      {'active_ids': [ref("project.project_task_1")],})
diff --git a/addons/project_gtd/test/timebox.yml b/addons/project_gtd/test/timebox.yml
deleted file mode 100644 (file)
index 7379f58..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
--
-  In order to set Daily tasks  into Weekly Timebox, I create plan for that
--
-  !record {model: project.timebox.fill.plan, id: plan_id}:
-    task_ids: [project.project_task_10]
-    timebox_id: timebox_daily
-    timebox_to_id: timebox_weekly
--
-  I run plan to set Daily tasks  into Weekly Timebox
--
-  !python {model: project.timebox.fill.plan}: |
-    self.process(cr, uid, [ref("plan_id")])
--
-  I check Weekly Timebox of task after set Timebox
--
-  !assert {model: project.task, id: project.project_task_10, string: Task should be set to weekly timebox}:
-     - timebox_id.id == ref("timebox_weekly")
--
-  I Empty the Daily Timebox
--
-  !python {model: project.timebox.empty}: |
-      self._empty(cr, uid,  {"active_model": "project.gtd.timebox",
-      "active_ids":[ref("timebox_daily")],
-      "active_id": ref("timebox_daily"),
-      })
--
-  I check task 'Develop time management module' is no more in Daily Timebox
--
-  !assert {model: project.task, id: project.project_task_10 , string: Task is not in Daily Timebox}:
-     - timebox_id.id != ref("timebox_daily")
--
-  I set Previous Timebox on task
--
-  !python {model: project.task}: |
-     self.prev_timebox(cr, uid, [ref("project.project_task_10")],
-     {'active_ids': [ref("project.project_task_1")],})
--
-  I set Next Timebox on task
--
-  !python {model: project.task}: |
-      self.next_timebox(cr, uid, [ref("project.project_task_10")],
-      {'active_ids': [ref("project.project_task_1")],})