def __init__(self, parent=None):
        QtWidgets.QDialog.__init__(self, parent)
        self._ui = Ui_AuthoriseApplicationDialog()
        self._ui.setupUi(self)

        pmr_info = PMR()
        client_tokens = pmr_info.get_client_token_kwargs()
        self._helper = TokenHelper(
            client_key=client_tokens['client_key'],
            client_secret=client_tokens['client_secret'],
            site_url=pmr_info.host(),
        )
 def setUp(self):
     self.helper = TokenHelper('client_key', 'client_secret')
     self.dsf = DummySessionFactory()
     self.helper.oauth_session_cls = self.dsf