def METHOD_NAME(server, cert, result, monkeysession):
    # this is due to requests being used by rfc3161ng
    # requests methods are modified in conftest.py which prohibits calling external servers
    monkeysession.setattr('requests.get', httpx.get)
    monkeysession.setattr('requests.post', httpx.post)
    token = get_rfc3161_token('test_hash', server=server, cert=cert)
    assert (token is not None) is result
    if result:
        rfc3161ng_time = rfc3161ng.get_timestamp(token)
        assert rfc3161ng_time < datetime.timedelta(seconds=5) + datetime.datetime.now()
        metadata = RFC3161Timestamp()
        metadata.token = token
        new_metadata = RFC3161Timestamp.m_from_dict(metadata.m_to_dict())
        assert new_metadata.token == token
        assert rfc3161ng.get_timestamp(new_metadata.token) == rfc3161ng_time