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

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

src/m/a/MapProxy-1.6.0/mapproxy/test/unit/test_exceptions.py   MapProxy(Download)
    def test_render(self):
        req = self.mock(WMSMapRequest)
        ex_handler = self.mock(ExceptionHandler)
 
        req_ex = RequestError('the exception message', request=req)
    def test_render(self):
        req = self.mock(WMSMapRequest)
        req_ex = RequestError('the exception message', request=req)
        ex_handler = WMS111ExceptionHandler()
        self.expect(req.exception_handler).result(ex_handler)
    def test_render_w_code(self):
        req = self.mock(WMSMapRequest)
        req_ex = RequestError('the exception message', code='InvalidFormat',
                                  request=req)
        ex_handler = WMS111ExceptionHandler()
    def test_render(self):
        req = self.mock(WMSMapRequest)
        req_ex = RequestError('the exception message', request=req)
        ex_handler = WMS110ExceptionHandler()
        self.expect(req.exception_handler).result(ex_handler)

src/m/a/mapproxy-HEAD/mapproxy/test/unit/test_exceptions.py   mapproxy(Download)
    def test_render(self):
        req = self.mock(WMSMapRequest)
        ex_handler = self.mock(ExceptionHandler)
 
        req_ex = RequestError('the exception message', request=req)
    def test_render(self):
        req = self.mock(WMSMapRequest)
        req_ex = RequestError('the exception message', request=req)
        ex_handler = WMS111ExceptionHandler()
        self.expect(req.exception_handler).result(ex_handler)
    def test_render_w_code(self):
        req = self.mock(WMSMapRequest)
        req_ex = RequestError('the exception message', code='InvalidFormat',
                                  request=req)
        ex_handler = WMS111ExceptionHandler()
    def test_render(self):
        req = self.mock(WMSMapRequest)
        req_ex = RequestError('the exception message', request=req)
        ex_handler = WMS110ExceptionHandler()
        self.expect(req.exception_handler).result(ex_handler)

src/m/a/mapproxy-HEAD/mapproxy/test/unit/test_response.py   mapproxy(Download)
    def test_str_response(self):
        resp = Response('string content')
        assert isinstance(resp.response, basestring)
        start_response = self.mock()
        self.expect(start_response('200 OK', ANY))
    def test_itr_response(self):
        resp = Response(iter(['string content', 'as iterable']))
        assert hasattr(resp.response, 'next')
        start_response = self.mock()
        self.expect(start_response('200 OK', ANY))
    def test_file_response(self):
        data = StringIO('foobar')
        resp = Response(data)
        assert resp.response == data
        start_response = self.mock()
    def test_file_response_w_file_wrapper(self):
        data = StringIO('foobar')
        resp = Response(data)
        assert resp.response == data
        start_response = self.mock()
        self.expect(start_response('200 OK', ANY))
 
        file_wrapper = self.mock()

src/m/a/MapProxy-1.6.0/mapproxy/test/unit/test_response.py   MapProxy(Download)
    def test_str_response(self):
        resp = Response('string content')
        assert isinstance(resp.response, basestring)
        start_response = self.mock()
        self.expect(start_response('200 OK', ANY))
    def test_itr_response(self):
        resp = Response(iter(['string content', 'as iterable']))
        assert hasattr(resp.response, 'next')
        start_response = self.mock()
        self.expect(start_response('200 OK', ANY))
    def test_file_response(self):
        data = StringIO('foobar')
        resp = Response(data)
        assert resp.response == data
        start_response = self.mock()
    def test_file_response_w_file_wrapper(self):
        data = StringIO('foobar')
        resp = Response(data)
        assert resp.response == data
        start_response = self.mock()
        self.expect(start_response('200 OK', ANY))
 
        file_wrapper = self.mock()