Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(20)  |  Call(20)  |  Derive(0)  |  Import(0)
Fail if the two objects are unequal as determined by the '=='
operator.

src/w/e/WebCore-HEAD/tests/test_rest.py   WebCore(Download)
    def test_options(self):
        response = self.assertResponse('/test/', _method="OPTIONS")
        self.assertEqual(response.headers['Allow'].split(', '), ['GET', 'POST', 'HEAD', 'OPTIONS'])
 
    def test_head(self):
        get = self.assertResponse('/test/')
        self.assertEqual(get.content_length, 17)
 
        head = self.assertResponse('/test/', _method="HEAD", body="")
        self.assertEqual(head.content_length, 17)
    def test_override(self):
        head = self.assertResponse('/test/?_verb=HEAD', body="")
        self.assertEqual(head.content_length, 17)
 
    def test_deprecation(self):

src/w/e/WebCore-HEAD/tests/test_rpc_json.py   WebCore(Download)
        response = request.get_response(self.app)
 
        self.assertEqual((response.status, response.content_type), (status, content_type))
 
        for i, j in kw.iteritems():
            self.assertEqual(getattr(response, i), j)
        try:
            data = loads(response.body)
            self.assertEqual(data['id'], self.id_)
        except:
            pass
    def test_bad_json_input(self):
        request = Request.blank('/', method="POST", body="[foo")
        response = request.get_response(self.app)
        self.assertEqual((response.status, response.content_type), ('400 Bad Request', 'text/plain'))
 
    def test_missing_method(self):
        request = Request.blank('/', method="POST", body='{"params": [], "id": null}')
        response = request.get_response(self.app)
        self.assertEqual((response.status, response.content_type), ('400 Bad Request', 'text/plain'))

src/w/e/WebCore-HEAD/tests/test_rpc_xml.py   WebCore(Download)
        response = request.get_response(self.app)
 
        self.assertEqual((response.status, response.content_type), (status, content_type))
 
        for i, j in kw.iteritems():
            self.assertEqual(getattr(response, i), j)
    def test_empty_request(self):
        request = Request.blank('/', method="POST", body="")
        response = request.get_response(self.app)
        self.assertEqual((response.status, response.content_type), ('411 Length Required', "text/plain"))
 
    def test_large_request(self):
        request = Request.blank('/', method="POST", body=" " * 1026)
        response = request.get_response(self.app)
        self.assertEqual((response.status, response.content_type), ('413 Request Entity Too Large', "text/plain"))

src/w/e/WebCore-HEAD/tests/test_auth.py   WebCore(Download)
    def test_get_method_null(self):
        self.assertEqual(self.wa.get_method(''), None)
 
    def test_get_method_shallow(self):
        foo = self.wa.get_method('web.core.application:Application')

src/w/e/WebCore-HEAD/tests/test_locale.py   WebCore(Download)
        resp1 = self.assertResponse('/sid', _environ=self.environ)
        resp2 = self.assertResponse('/sid', _environ=self.environ)
        self.assertEqual(resp1.body, resp2.body)
 
    def test_set_lang(self):

src/w/e/WebCore-HEAD/tests/test_rpc_amf.py   WebCore(Download)
            data = None
 
        self.assertEqual((response.status, response.content_type), (status, content_type))
 
        for i, j in kw.iteritems():
            self.assertEqual(getattr(response, i), j)