'If you accept the request, you\'re redirected to the redirect_url with
the correct query params.'

def test_accepting_redirects(self):

    self._auth()
    assert self.oauth_page.visit()
    self.oauth_page.confirm()
    self.oauth_page.wait_for_element_absence('input[name=authorize]', 'Authorization    button    is    not    present')
    def check_query_string():
        "\n                                                Checks    that    'code'    appears    in    the    browser's    current    url.\n                                                "
        query = self._qs(self.browser.current_url)
        return ('code' in query)
    def check_query_string_chrome():
        '\n                                                Similar    to    check_query_string,    but,    due    to    a    bug    in    ChromeDriver,\n                                                when    chrome    is    on    an    invalid    URI,    `self.browser.current_url`    outputs\n                                                "data:text/html,chromewebdata"    instead    of    the    current    URI.\n\n                                                However,    since    the    query    string    is    present    in    the    `title`,    we    use\n                                                that    for    chrome.\n                                                '
        query = self._qs(self.browser.title)
        return ('code' in query)
    if (self.browser.name == 'chrome'):
        self.oauth_page.wait_for(check_query_string_chrome, 'redirected    with    correct    query    parameters    (chrome)')
    else:
        self.oauth_page.wait_for(check_query_string, 'redirected    with    correct    query    parameters')
