Ejemplo n.º 1
0
 def test_process_response_imgs(self):
     host_url = 'http://www.davidcmoss.co.uk/'
     content = "<img src='test.png' />"
     response = Response()
     response.url = host_url
     response._content = content
     page = process_response(host_url, response)
     assert host_url + 'test.png' in page.images
Ejemplo n.º 2
0
 def test_process_response_ex_links(self):
     host_url = 'http://www.davidcmoss.co.uk/'
     content = "<a href='http://google.com' />"
     response = Response()
     response.url = host_url
     response._content = content
     page = process_response(host_url, response)
     assert 'http://google.com' in page.ex_links
Ejemplo n.º 3
0
 def test_process_response_links(self):
     host_url = 'http://www.davidcmoss.co.uk/'
     content = "<a href='/test' />"
     response = Response()
     response.url = host_url
     response._content = content
     page = process_response(host_url, response)
     assert host_url + 'test' in page.links
Ejemplo n.º 4
0
 def test_process_response_imgs(self):
     host_url = 'http://www.davidcmoss.co.uk/'
     content = "<img src='test.png' />"
     response = Response()
     response.url = host_url
     response._content = content
     page = process_response(host_url, response)
     assert host_url + 'test.png' in page.images
Ejemplo n.º 5
0
 def test_process_response_ex_links(self):
     host_url = 'http://www.davidcmoss.co.uk/'
     content = "<a href='http://google.com' />"
     response = Response()
     response.url = host_url
     response._content = content
     page = process_response(host_url, response)
     assert 'http://google.com' in page.ex_links
Ejemplo n.º 6
0
 def test_process_response_links(self):
     host_url = 'http://www.davidcmoss.co.uk/'
     content = "<a href='/test' />"
     response = Response()
     response.url = host_url
     response._content = content
     page = process_response(host_url, response)
     assert host_url + 'test' in page.links