File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,8 +12,13 @@ class TestProjectTimeline(BaseCommon):
1212 @classmethod
1313 def setUpClass (cls ):
1414 super ().setUpClass ()
15- cls .project = cls .env .ref ("project.project_project_1" )
16- cls .stage = cls .env .ref ("project.project_stage_2" )
15+ cls .project = cls .env ["project.project" ].create ({"name" : "Project Test" })
16+ cls .stage_done = cls .env ["project.task.type" ].create (
17+ {
18+ "name" : "Done" ,
19+ "fold" : True ,
20+ }
21+ )
1722 cls .task = cls .env ["project.task" ].create (
1823 {"name" : "test" , "user_ids" : False , "project_id" : cls .project .id }
1924 )
@@ -25,7 +30,7 @@ def test_01_flow_filling(self):
2530 self .assertFalse (self .task .planned_date_end )
2631 self .task .write (
2732 {
28- "stage_id" : self .stage .id ,
33+ "stage_id" : self .stage_done .id ,
2934 "date_end" : fields .Datetime .add (self .task .planned_date_start , days = 1 ),
3035 }
3136 )
@@ -44,7 +49,7 @@ def test_02_no_filling(self):
4449 self .assertEqual (
4550 task .planned_date_start , fields .Datetime .from_string ("2018-05-01" )
4651 )
47- task .stage_id = self .stage
52+ task .stage_id = self .stage_done
4853 self .assertEqual (
4954 task .planned_date_end , fields .Datetime .from_string ("2018-05-07" )
5055 )
You can’t perform that action at this time.
0 commit comments