def test_notFound(self):
   """Check for not found response."""
   cxn = tests.httpConnection()
   cxn.request('GET', '/foo')
   response = cxn.getresponse()
   self.assertEqual(response.status, 404)
   assert len(response.read()) > 30, 'not found body length'
   cxn.close()
 def test_sitemap(self):
   """Check for sitemap.xml response."""
   cxn = tests.httpConnection()
   cxn.request('GET', '/sitemap.xml')
   response = cxn.getresponse()
   self.assertEqual(response.status, 200)
   assert len(response.read()) > 200, 'sitemap.xml body length'
   cxn.close()
 def test_goog_verify(self):
   """Check for google verification response."""
   cxn = tests.httpConnection()
   cxn.request('GET', '/googlef734612d306d87e6.html')
   response = cxn.getresponse()
   self.assertEqual(response.status, 200)
   self.assertEqual(response.read(), 'google-site-verification: googlef734612d306d87e6.html')
   cxn.close()
 def test_robots(self):
   """Check for robots.txt response."""
   cxn = tests.httpConnection()
   cxn.request('GET', '/robots.txt')
   response = cxn.getresponse()
   self.assertEqual(response.status, 200)
   self.assertEqual(response.read(), 'User-agent: *\nAllow: /\n')
   cxn.close()