code: def test_list(self):
      self.__setup()
      # Create tasks in the project
      task_obj_1 = self.task_controller.create()
      task_obj_2 = self.task_controller.create()
  
      # List all tasks regardless of filters
      result = self.task_controller.list()
  
      assert (
          len(result) == 2
          and task_obj_1 in result
          and task_obj_2 in result
      )
  
      # List all tasks regardless of filters in ascending
      result = self.task_controller.list(
          sort_key="created_at", sort_order="ascending"
      )
  
      assert (
          len(result) == 2
          and task_obj_1 in result
          and task_obj_2 in result
      )
      assert result[0].created_at <= result[-1].created_at
  
      # List all tasks regardless of filters in descending
      result = self.task_controller.list(
          sort_key="created_at", sort_order="descending"
      )
      assert (
          len(result) == 2
          and task_obj_1 in result
          and task_obj_2 in result
      )
      assert result[0].created_at >= result[-1].created_at
  
      # Wrong order being passed in
      failed = False
      try:
          _ = self.task_controller.list(
              sort_key="created_at", sort_order="wrong_order"
          )
      except InvalidArgumentType:
          failed = True
      assert failed
  
      # Wrong key and order being passed in
      failed = False
      try:
          _ = self.task_controller.list(
              sort_key="wrong_key", sort_order="wrong_order"
          )
      except InvalidArgumentType:
          failed = True
      assert failed
  
      # wrong key and right order being passed in
      expected_result = self.task_controller.list(
          sort_key="created_at", sort_order="ascending"
      )
      result = self.task_controller.list(
          sort_key="wrong_key", sort_order="ascending"
      )
      expected_ids = [item.id for item in expected_result]
      ids = [item.id for item in result]
      assert set(expected_ids) == set(ids)
  
      # List all tasks
      result = self.task_controller.list()
  
      assert (
          len(result) == 2
          and task_obj_1 in result
          and task_obj_2 in result
      )
  
imports: import os
  import uuid
  import tempfile
  import platform
  from io import open, TextIOWrapper
  from datmo.config import Config
  from datmo.core.controller.project import ProjectController
  from datmo.core.controller.environment.environment import EnvironmentController
  from datmo.core.controller.task import TaskController
  from datmo.core.entity.task import Task
  from datmo.core.util.exceptions import EntityNotFound, TaskRunError, InvalidArgumentType, RequiredArgumentMissing, ProjectNotInitialized, InvalidProjectPath, TooManyArgumentsFound, DoesNotExist
  from datmo.core.util.misc_functions import check_docker_inactive, pytest_docker_environment_failed_instantiation
label_desc: Use image node_id 11 for calling the TestTaskController obj's underlying member method code with example usage: obj.test_list() without return types