def test_groupby_context(self): """Test that next actions can be grouped by context.""" self.namespace.groupby = "context" self.assertEqual( f"No context:\n- {self.call_mom.text}\nhome:\n- {self.paint_house.text}\n- {self.fix_lamp.text}", render_grouped_tasks( [self.call_mom, self.paint_house, self.fix_lamp], self.namespace))
def test_groupby_priority(self): """Test that next actions can be grouped by priority.""" self.namespace.groupby = "priority" self.assertEqual( f"No priority:\n- {self.call_mom.text}\nA:\n- {self.paint_house.text}\n- {self.fix_lamp.text}", render_grouped_tasks( [self.call_mom, self.paint_house, self.fix_lamp], self.namespace))
def test_groupby_project(self): """Test that next actions can be grouped by project.""" self.namespace.groupby = "project" self.assertEqual( f"No project:\n- {self.call_mom.text}\nHomeImprovement:\n- {self.paint_house.text}\n" f"- {self.fix_lamp.text}", render_grouped_tasks( [self.call_mom, self.paint_house, self.fix_lamp], self.namespace))
def test_groupby_source(self): """Test that next actions can be grouped by source file.""" self.namespace.groupby = "source" self.assertEqual( f"{self.call_mom.filename}:\n- {self.call_mom.text}\n{self.paint_house.filename}:\n" f"- {self.paint_house.text}\n- {self.fix_lamp.text}", render_grouped_tasks( [self.call_mom, self.paint_house, self.fix_lamp], self.namespace))
def test_groupby_due_date(self): """Test that next actions can be grouped by due date.""" self.namespace.groupby = "duedate" self.assertEqual( f"No due date:\n- {self.call_mom.text}\n2018-10-10:\n- {self.paint_house.text}\n" f"- {self.fix_lamp.text}", render_grouped_tasks( [self.call_mom, self.paint_house, self.fix_lamp], self.namespace))