class_docstr: Checks all functions of the DockerEnvironmentDriver
class_docstr_tok: ["Checks","all","functions","of","the","DockerEnvironmentDriver"]
code: def test_create_datmo_definition(self):
      # Test 1
      input_dockerfile_path = os.path.join(
          self.docker_environment_driver.root, "Dockerfile"
      )
      output_dockerfile_path = os.path.join(
          self.docker_environment_driver.root, "datmoDockerfile"
      )
      result = self.docker_environment_driver.create_datmo_definition(
          input_dockerfile_path, output_dockerfile_path
      )
      assert result
      assert os.path.isfile(output_dockerfile_path)
      output = open(output_dockerfile_path, "r").read()
      print(repr(output))
      assert "datmo essential" in output
  
      # Test 2: With workspaces on datmo base image
      os.remove(output_dockerfile_path)
      with open(input_dockerfile_path, "wb") as f:
          f.write(
              to_bytes("FROM datmo/python-base:cpu-py27" + os.linesep)
          )
          f.write(to_bytes(str("RUN echo " + self.random_text)))
      result = self.docker_environment_driver.create_datmo_definition(
          input_dockerfile_path,
          output_dockerfile_path,
          workspace="notebook",
      )
      assert result
      assert os.path.isfile(output_dockerfile_path)
      output = open(output_dockerfile_path, "r").read()
      print(repr(output))
      assert "FROM datmo/python-base:cpu-py27-notebook" in output
      assert "datmo essential" in output
  
      # Test 3: With workspaces on datmo base image with jupyterlab
      os.remove(output_dockerfile_path)
      with open(input_dockerfile_path, "wb") as f:
          f.write(to_bytes("FROM datmo/python-base:cpu-py27" + "\n"))
          f.write(to_bytes(str("RUN echo " + self.random_text)))
      result = self.docker_environment_driver.create_datmo_definition(
          input_dockerfile_path,
          output_dockerfile_path,
          workspace="jupyterlab",
      )
      assert result
      assert os.path.isfile(output_dockerfile_path)
      output = open(output_dockerfile_path, "r").read()
      print(repr(output))
      assert "FROM datmo/python-base:cpu-py27-jupyterlab" in output
      assert "datmo essential" in output
  
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 38 for calling the TestDockerEnv obj's underlying member method code with example usage: obj.test_create_datmo_definition() without return types