class_docstr: Checks all functions of the DockerEnvironmentDriver
class_docstr_tok: ["Checks","all","functions","of","the","DockerEnvironmentDriver"]
code: def test_create(self):
      input_dockerfile_path = os.path.join(
          self.docker_environment_driver.root, "Dockerfile"
      )
      output_dockerfile_path = os.path.join(
          self.docker_environment_driver.root, "datmoDockerfile"
      )
      # Test both default values
      (
          success,
          path,
          output_path,
      ) = self.docker_environment_driver.create()
  
      assert (
          success
          and os.path.isfile(output_dockerfile_path)
          and "datmo" in open(output_dockerfile_path, "r").read()
      )
      assert path == input_dockerfile_path
      assert output_path == output_dockerfile_path
  
      open(output_dockerfile_path, "r").close()
      os.remove(output_dockerfile_path)
  
      # Test default values for output
      (
          success,
          path,
          output_path,
      ) = self.docker_environment_driver.create(input_dockerfile_path)
  
      assert (
          success
          and os.path.isfile(output_dockerfile_path)
          and "datmo" in open(output_dockerfile_path, "r").read()
      )
      assert path == input_dockerfile_path
      assert output_path == output_dockerfile_path
  
      open(output_dockerfile_path, "r").close()
      os.remove(output_dockerfile_path)
  
      # Test both values given
      (
          success,
          path,
          output_path,
      ) = self.docker_environment_driver.create(
          input_dockerfile_path, output_dockerfile_path
      )
      assert (
          success
          and os.path.isfile(output_dockerfile_path)
          and "datmo" in open(output_dockerfile_path, "r").read()
      )
      assert path == input_dockerfile_path
      assert output_path == output_dockerfile_path
  
      # Test exception for output path already exists
      failed = False
      try:
          self.docker_environment_driver.create(
              output_path=output_dockerfile_path
          )
      except FileAlreadyExistsError:
          failed = True
      assert failed
  
      # Test exception for path does not exist
      os.remove(input_dockerfile_path)
      open(output_dockerfile_path, "r").close()
      os.remove(output_dockerfile_path)
  
imports: from __future__ import division
  from __future__ import print_function
  from __future__ import unicode_literals
  import os
  import shutil
  import tempfile
  import platform
  import threading
  import sys
  import uuid
  import timeout_decorator
  from io import open
  from datmo.core.controller.environment.driver.dockerenv import DockerEnvironmentDriver
  from datmo.core.util.exceptions import EnvironmentInitFailed, EnvironmentConnectFailed, FileAlreadyExistsError, EnvironmentRequirementsCreateError, EnvironmentImageNotFound, EnvironmentContainerNotFound, PathDoesNotExist, EnvironmentDoesNotExist, EnvironmentExecutionError
  from datmo.core.util.misc_functions import check_docker_inactive, pytest_docker_environment_failed_instantiation
label_desc: Use image node_id 16 for calling the TestDockerEnv obj's underlying member method code with example usage: obj.test_create() without return types