def testFullRequest(self):
     urlParts = httpStatusBot.formatUrl('www.google.com/testsuite/testcase')
     self.assertEqual(urlParts[0], 'www.google.com')
     self.assertEqual(urlParts[1], '/testsuite/testcase')
 def testNoWWWRequest(self):
     url = httpStatusBot.formatUrl('stackoverflow.com/questions/3278418/testing-urllib2-application-http-responses-loaded-from-files')
     self.assertEqual(url[0], 'stackoverflow.com')
     self.assertEqual(url[1], '/questions/3278418/testing-urllib2-application-http-responses-loaded-from-files')
 def testHTTPRequest(self):
     url = httpStatusBot.formatUrl('http://localhost:80/')
     self.assertEqual(url[0], 'localhost:80')
     self.assertEqual(url[1], '/')
 def testHostRequest(self):
     urlParts = httpStatusBot.formatUrl('www.google.com')
     self.assertEqual(urlParts[0], 'www.google.com')
     self.assertEqual(urlParts[1], '')