def test_invalid_token(config):
    configure(config)
    request = DummyRequest()
    request.matchdict['token'] = 'foobar'

    from h.notification.views import unsubscribe
    with raises(ValueError) as excinfo:
        unsubscribe(request)

    assert str(excinfo.value) == 'Invalid signature'
It raises an error if an invalid token is provided
dataset/ETHPy150Open hypothesis/h/h/notification/test/notification_views_test.py/test_invalid_token