def setup_stub():
  apiproxy_stub_map.apiproxy = apiproxy_stub_map.APIProxyStubMap()
  stub = datastore_file_stub.DatastoreFileStub('test','/dev/null',
                                               '/dev/null', trusted=True)
  apiproxy_stub_map.apiproxy.RegisterStub('datastore_v3', stub)

  apiproxy_stub_map.apiproxy.RegisterStub(
    'user', user_service_stub.UserServiceStub())

  apiproxy_stub_map.apiproxy.RegisterStub(
    'memcache', memcache_stub.MemcacheServiceStub())

  apiproxy_stub_map.apiproxy.RegisterStub(
    'urlfetch', urlfetch_stub.URLFetchServiceStub())

  apiproxy_stub_map.apiproxy.RegisterStub(
    'taskqueue', taskqueue_stub.TaskQueueServiceStub())

  try:
    apiproxy_stub_map.apiproxy.RegisterStub(
      'images', images_stub.ImagesServiceStub())
  except __HOLE__:
    pass
dataset/ETHPy150Open IanLewis/kay/kay/management/test.py/setup_stub