def __init__(self, **kwargs):
    super(TestLaunchBinaries, self).__init__(**kwargs)
    self.context = ["Platform:%s" % self.platform.title()]
    self.binary = config_lib.CONFIG.Get(
        "Executables.aff4_path", context=self.context).Add(
            "test/%s" % self.ds_names[self.platform])

    self.args = dict(binary=self.binary)

    try:
      aff4.FACTORY.Open(self.binary, aff4_type="GRRSignedBlob",
                        token=self.token)
    except IOError:
      print "Uploading the test binary to the Executables area."
      source = os.path.join(config_lib.CONFIG["Test.data_dir"],
                            self.filenames[self.platform])

      if not os.path.exists(source):
        self.fail("Path %s should exist." % source)

      maintenance_utils.UploadSignedConfigBlob(
          open(source, "rb").read(), aff4_path=self.binary,
          client_context=self.context, token=self.token, limit=self.limit)
dataset/ETHPy150Open google/grr/grr/endtoend_tests/administrative.py/TestLaunchBinaries.__init__/original