Did I find the right examples for you? yes no

All Samples(3)  |  Call(3)  |  Derive(0)  |  Import(0)

src/r/e/rest-api-sdk-python-HEAD/test/unit_tests/exceptions_test.py   rest-api-sdk-python(Download)
  def test_not_found(self):
    response = self.Response(status_code="404", reason="Not Found" )
    error = ResourceNotFound(response)
    self.assertEqual(str(error), "Failed. Response status: %s. Response message: %s." % (response.status_code, response.reason))
 
  def test_unauthorized_access(self):
    response = self.Response(status_code="401", reason="Unauthorized" )

src/w/e/webcompare-HEAD/tests.py   webcompare(Download)
    def test_http_response(self):
        r = self.Response(self.urlopen(self.url))
        self.assertEquals(r.code, 200)
        self.assertEquals(r.url, "http://www.google.com/")
        self.assertEquals(r.content_type, "text/html; charset=ISO-8859-1")