text: import os
  
  import pytest
  
  from datadog_checks.dev import docker_run, get_docker_hostname, get_here
  
  URL = 'http://{}:8000/apcu-dd-handler.php'.format(get_docker_hostname())
  INSTANCE = {'url': URL}
  
  
  @pytest.fixture(scope='session')
  def dd_environment():
      compose_file = os.path.join(get_here(), 'docker-compose.yml')
  
      with docker_run(compose_file, endpoints=[URL]):
          yield INSTANCE
  
  
  @pytest.fixture
  def instance():
      return INSTANCE.copy()
  