Example #1
0
 def test_geturlresponse_notfound(self):
     """Get error response from incorrect url"""
     loader = ImageLoader(['-u', 'http://www.google.com'])
     _, status = loader.get_url_response(
         "http://www.google.com/this-does-not-exist.xml")
     self.assertEqual(status, 404)
Example #2
0
 def test_downloadrawurl_ok(self):
     """Get OK response from proper url"""
     loader = ImageLoader(['-u', 'http://www.google.com'])
     _, status = loader.get_url_response("http://www.google.com/")
     self.assertEqual(status, 200)