def METHOD_NAME(self):
    token = self.service._token
    self.service.change_token("")
    try:
        with pytest.raises(PagureAPIException) as exc:
            self.service.user.get_username()
        assert "Invalid or expired token" in str(exc)
    finally:
        self.service.change_token(token)
    self.service.user.get_username()
    self.service.user.get_username()  # 2nd identical call