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)
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)
def testInitializationWithEmptyTask(self): tasks = TaskList() size = tasks.count() self.assertEqual(size, 0)