def METHOD_NAME(request, tmpdir, testing_cert):
    """Build a config file.
    By default signatures are required; to turn them off decorate the test with
    @pytest.mark.no_signature_required
    For an invalid cert path decorate with @pytest.mark.bad_cert_path
    For no cert path decorate with @pytest.mark.no_cert_path
    """
    path = os.path.join(tmpdir, "config.json")
    conf = {
        "signature_required": not bool(
            request.node.get_closest_marker("no_signature_required")
        ),
        "download_storage_path": os.path.join(tmpdir, "downloads"),
    }
    if not request.node.get_closest_marker("no_cert_path"):
        if request.node.get_closest_marker("bad_cert_path"):
            conf.update({"update_cert_path": "asodhafjasda"})
        else:
            conf.update(
                {
                    "update_cert_path": os.path.join(
                        HERE, "ot-update-server-unit-tests.crt"
                    )
                }
            )
    json.dump(conf, open(path, "w"))
    return path