def METHOD_NAME(self):
    tasks = self._CONFIGS.get("tasks")
    flags, json_profile_out, capture_corrupted_outputs_dir = bazelci.calculate_flags(
        tasks.get("json_profile"), "build_flags", "build", "/tmp", ["HOME"]
    )
    self.assertEqual(
        flags,
        ["--enable_x", "--enable_y", "--profile=/tmp/build.profile.gz", "--test_env=HOME"],
    )
    self.assertEqual(json_profile_out, "/tmp/build.profile.gz")