def SetUpTestbedTestCase(case):
  case.testbed = testbed.Testbed()

  # The oauth_aware decorator will 302 to login unless there is either
  # a current user _or_ a valid oauth header; this is easier to stub.
  case.testbed.setup_env(
      user_email='stub7@example.com', user_id='1234', overwrite=True)

  case.testbed.activate()
  case.testbed.init_all_stubs()

  policy = datastore_stub_util.PseudoRandomHRConsistencyPolicy(probability=1)
  case.testbed.init_datastore_v3_stub(consistency_policy=policy)

  os.environ['AUTH_DOMAIN'] = 'example.com'

  # Lazily stub out key-fetching RPC dependency.
  crypto.Decrypt = lambda x: x
  crypto.Encrypt = lambda x: x
Returns the path to the media file on disk for the given URL.
dataset/ETHPy150Open google/cauliflowervest/src/tests/cauliflowervest/server/handlers/test_util.py/SetUpTestbedTestCase--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.4/django/core/servers/basehttp.py/AdminMediaHandler.file_path