def METHOD_NAME(self):
    client = MobileApplicationClient(self.client_id)
    # Parse code and state
    response = client.parse_request_uri_response(self.response_uri, scope=self.scope)
    self.assertEqual(response, self.token)
    self.assertEqual(client.access_token, response.get("access_token"))
    self.assertEqual(client.refresh_token, response.get("refresh_token"))
    self.assertEqual(client.token_type, response.get("token_type"))
    # Mismatching scope
    self.assertRaises(Warning, client.parse_request_uri_response, self.response_uri, scope="invalid")
    os.environ['OAUTHLIB_RELAX_TOKEN_SCOPE'] = '4'
    token = client.parse_request_uri_response(self.response_uri, scope='invalid')
    self.assertTrue(token.scope_changed)
    scope_changes_recorded = []
    def record_scope_change(sender, message, old, new):
        scope_changes_recorded.append((message, old, new))
    signals.scope_changed.connect(record_scope_change)
    try:
        client.parse_request_uri_response(self.response_uri, scope="invalid")
        self.assertEqual(len(scope_changes_recorded), 1)
        message, old, new = scope_changes_recorded[0]
        self.assertEqual(message, 'Scope has changed from "invalid" to "/profile".')
        self.assertEqual(old, ['invalid'])
        self.assertEqual(new, ['/profile'])
    finally:
        signals.scope_changed.disconnect(record_scope_change)
    del os.environ['OAUTHLIB_RELAX_TOKEN_SCOPE']