def verify_shard_task(self, task, shard_id, slice_id=0, eta=None,
                        countdown=None, verify_spec=True, **kwargs):
    expected_task_name = handlers.MapperWorkerCallbackHandler.get_task_name(
        shard_id, slice_id)
    self.assertEqual(expected_task_name, task["name"])
    self.assertEqual("POST", task["method"])
    self.assertEqual("/mapreduce/worker_callback/" + shard_id, task["url"])
    if eta:
      self.assertEqual(eta.strftime("%Y/%m/%d %H:%M:%S"), task["eta"])
    if countdown:
      expected_etc_sec = time.time() + countdown
      eta_sec = time.mktime(time.strptime(task["eta"], "%Y/%m/%d %H:%M:%S"))
      self.assertTrue(expected_etc_sec < eta_sec + 10)

    request = mock_webapp.MockRequest()
    request.body = base64.b64decode(task["body"])
    request.headers = dict(task["headers"])

    payload = model.HugeTask.decode_payload(request)
    self.assertEqual(str(shard_id), payload["shard_id"])
    self.assertEqual(str(slice_id), payload["slice_id"])

    if verify_spec:
      self.assertTrue(payload["mapreduce_spec"])
      mapreduce_spec = model.MapreduceSpec.from_json_str(
          payload["mapreduce_spec"])
      self.verify_mapreduce_spec(mapreduce_spec, **kwargs)
Cancel this L{DeferredList}.
dataset/ETHPy150Open GoogleCloudPlatform/appengine-mapreduce/python/test/mapreduce/handlers_test.py/MapreduceHandlerTestBase.verify_shard_task--crossover with--dataset/ETHPy150Open twisted/twisted/twisted/internet/defer.py/DeferredList.cancel