コード例 #1
0
 def testInitializationWithJson(self):
     tasks = [
         mock_task_data,
         mock_task_data.copy(),
         mock_task_data.copy()
     ]
     task_list = TaskList(tasks)
     size = task_list.count()
     self.assertEqual(size, 3)
コード例 #2
0
 def testCountTask(self):
     task = Task(mock_task_data)
     mock_task_data_2 = mock_task_data.copy()
     mock_task_data_3 = mock_task_data.copy()
     mock_task_data_2['id'] = 1
     mock_task_data_3['id'] = 2
     tasks = [
         mock_task_data,
         mock_task_data_2,
         mock_task_data_3
     ]
     task_list = TaskList(tasks)
     self.assertEqual(task_list.count(), 3)
コード例 #3
0
 def testInitializationWithEmptyTask(self):
     tasks = TaskList()
     size = tasks.count()
     self.assertEqual(size, 0)