docs: def update_environment(options):
          """
          Populate the environment variables that need to be added for test
          execution to work correctly.  Most (but not all) of these are to match
          what the Jenkins Sauce OnDemand plugin would use for the test
          configuration that was specified on the command line.
          """
          env = os.environ
          # https://docs.djangoproject.com/en/1.6/topics/testing/tools/#liveservertestcase
          env['DJANGO_LIVE_TEST_SERVER_ADDRESS'] = settings.DJANGO_LIVE_TEST_SERVER_ADDRESS
          tunnel_id = options['tunnel_id']
          if tunnel_id:
              env['SAUCE_TUNNEL_ID'] = tunnel_id
          if 'SAUCE_API_KEY' in env:
              # Jenkins plugin has already configured the environment for us
              return
          env['SELENIUM_BROWSER'] = options['browser_name']
          if options['command_executor']:
              env['SELENIUM_COMMAND_EXECUTOR'] = options['command_executor']
          platform = options['platform']
          browser_version = options['browser_version']
          if not platform or not browser_version:
              # None of the following Sauce OnDemand stuff applies
              return
          if settings.SELENIUM_SAUCE_CONNECT_PATH:
              host = 'localhost'
              port = '4445'
          else:
              host = 'ondemand.saucelabs.com'
              port = '80'
          env.update({
              'SAUCE_API_KEY': settings.SELENIUM_SAUCE_API_KEY,
              'SAUCE_USER_NAME': settings.SELENIUM_SAUCE_USERNAME,
              'SELENIUM_BROWSER': options['browser_name'],
              'SELENIUM_HOST': host,
              'SELENIUM_PLATFORM': platform,
              'SELENIUM_PORT': port,
              'SELENIUM_VERSION': browser_version,
          })