def resolves_for(self, session):
if self.url:<EOL><INDENT>self.actual_path = session.current_url<EOL><DEDENT>else:<EOL><INDENT>result = urlparse(session.current_url)<EOL>if self.only_path:<EOL><INDENT>self.actual_path = result.path<EOL><DEDENT>else:<EOL><INDENT>request_uri = result.path<EOL>if result.query:<EOL><INDENT>request_uri += "<STR_LIT>".format(result.query)<EOL><DEDENT>self.actual_path = request_uri<EOL><DEDENT><DEDENT>if isregex(self.expected_path):<EOL><INDENT>return self.expected_path.search(self.actual_path)<EOL><DEDENT>else:<EOL><INDENT>return normalize_url(self.actual_path) == normalize_url(self.expected_path)<EOL><DEDENT>
Returns whether this query resolves for the given session.

Args:
    session (Session): The session for which this query should be executed.

Returns:
    bool: Whether this query resolves.