Exemple #1
0
 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))
Exemple #2
0
 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))
Exemple #3
0
 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))
Exemple #4
0
 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))
Exemple #5
0
 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))