This would provide a nicer error when it fails:

    assert self.authentication_token in redirect_url, redirect_url