class_docstr: Checks all functions of the DockerEnvironmentDriver
class_docstr_tok: ["Checks","all","functions","of","the","DockerEnvironmentDriver"]
code: def test_extract_workspace_url(self):
      # TODO: test with all variables provided
      with open(self.dockerfile_path, "wb") as f:
          f.write(
              to_bytes(
                  "FROM datmo/python-base:cpu-py27-notebook"
                  + os.linesep
              )
          )
          f.write(to_bytes(str("RUN echo " + self.random_text)))
      self.docker_environment_driver.build_image(
          self.image_name, self.dockerfile_path
      )
  
      random_container_id = str(uuid.uuid1())
      my_queue = queue.Queue()
  
      def dummy(self, name, workspace, out_queue):
          workspace_url = (
              self.docker_environment_driver.extract_workspace_url(
                  name, workspace
              )
          )
          out_queue.put(workspace_url)
  
      @timeout_decorator.timeout(20, use_signals=False)
      def timed_run(self):
          (
              return_code,
              container_id,
          ) = self.docker_environment_driver.run_container(
              self.image_name,
              name=random_container_id,
              command=["jupyter", "notebook", "--allow-root"],
          )
          return return_code, container_id
  
      thread = threading.Thread(
          target=dummy,
          args=(self, random_container_id, "notebook", my_queue),
      )
      thread.daemon = True  # Daemonize thread
      thread.start()  # Start the execution
  
      timed_run_result = False
      try:
          _, _ = timed_run(self)
      except timeout_decorator.timeout_decorator.TimeoutError:
          timed_run_result = True
      thread.join()
      assert timed_run_result
      # asserting the workspace url to be passed
      workspace_url = my_queue.get()  # get the workspace url
      assert "http" in workspace_url
  
      # Test when there is no container being run
      workspace_url = (
          self.docker_environment_driver.extract_workspace_url(
              self.image_name, "notebook"
          )
      )
      assert workspace_url == None
  
      # teardown container
      self.docker_environment_driver.stop(
          random_container_id, force=True
      )
  
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 29 for calling the TestDockerEnv obj's underlying member method code with example usage: obj.test_extract_workspace_url() and returns: return_code,  container_id