示例#1
0
 def __parse_nodes(self, url):
     node_parser = NodeParser()
     node_parser.feed(self.response.text)
     payload = {'NodeID': node_parser.node_id, 'NodeDesc': 'All+Locations'}
     return self.session.post(url, data=payload)
class TestNodeParser(unittest.TestCase):
    def test_payload(self):
        self.parser = NodeParser()
        self.parser.feed(PostLoginPage.POST_LOGIN_PAGE)
        response_node_ids = '101100,102100,103100'
        assert self.parser.node_id == response_node_ids
示例#3
0
 def __parse_nodes(self, url):
     node_parser = NodeParser()
     node_parser.feed(self.response.text)
     payload = {"NodeID": node_parser.node_id, "NodeDesc": "All+Locations"}
     return self.session.post(url, data=payload)
示例#4
0
 def _fetch_search_page(session, url, login_response):
     node_parser = NodeParser()
     node_parser.feed(login_response)
     payload = {"NodeID": node_parser.node_id, "NodeDesc": "All+Locations"}
     return session.post(url, data=payload)