[mapproxy] 04/07: Refresh patches.
Bas Couwenberg
sebastic at debian.org
Mon Nov 20 16:28:15 UTC 2017
This is an automated email from the git hooks/post-receive script.
sebastic pushed a commit to branch master
in repository mapproxy.
commit a6276d8172ba6fb26e5a29c190758b00fa75fd15
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date: Mon Nov 20 16:49:02 2017 +0100
Refresh patches.
---
debian/changelog | 1 +
debian/patches/offline-tests.patch | 143 +++++++++++++++++++++++++------------
2 files changed, 97 insertions(+), 47 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 5a95ba0..7712d24 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,7 @@ mapproxy (1.11.0-1) UNRELEASED; urgency=medium
* New upstream release.
* Drop libproj-dev from build dependencies, not directly required and
already pulled in via libgdal-dev.
+ * Refresh patches.
-- Bas Couwenberg <sebastic at debian.org> Mon, 20 Nov 2017 16:42:47 +0100
diff --git a/debian/patches/offline-tests.patch b/debian/patches/offline-tests.patch
index 5cfb495..07f568e 100644
--- a/debian/patches/offline-tests.patch
+++ b/debian/patches/offline-tests.patch
@@ -4,7 +4,7 @@ Forwarded: not-needed
--- a/mapproxy/test/system/test_util_wms_capabilities.py
+++ b/mapproxy/test/system/test_util_wms_capabilities.py
-@@ -17,6 +17,7 @@ from __future__ import with_statement
+@@ -16,6 +16,7 @@
import os
from nose.tools import assert_raises
@@ -12,7 +12,7 @@ Forwarded: not-needed
from mapproxy.client.http import HTTPClient
from mapproxy.script.wms_capabilities import wms_capabilities_command
-@@ -36,6 +37,9 @@ class TestUtilWMSCapabilities(object):
+@@ -35,6 +36,9 @@ class TestUtilWMSCapabilities(object):
self.args = ['command_dummy', '--host', TESTSERVER_URL + '/service']
def test_http_error(self):
@@ -22,7 +22,7 @@ Forwarded: not-needed
self.args = ['command_dummy', '--host', 'http://foo.doesnotexist']
with capture() as (out,err):
assert_raises(SystemExit, wms_capabilities_command, self.args)
-@@ -47,6 +51,9 @@ class TestUtilWMSCapabilities(object):
+@@ -46,6 +50,9 @@ class TestUtilWMSCapabilities(object):
assert err.getvalue().startswith("ERROR:")
def test_request_not_parsable(self):
@@ -32,7 +32,7 @@ Forwarded: not-needed
with mock_httpd(TESTSERVER_ADDRESS, [({'path': '/service?request=GetCapabilities&version=1.1.1&service=WMS', 'method': 'GET'},
{'status': '200', 'body': ''})]):
with capture() as (out,err):
-@@ -55,6 +62,9 @@ class TestUtilWMSCapabilities(object):
+@@ -54,6 +61,9 @@ class TestUtilWMSCapabilities(object):
assert error_msg.startswith('Could not parse the document')
def test_service_exception(self):
@@ -42,7 +42,7 @@ Forwarded: not-needed
self.args = ['command_dummy', '--host', TESTSERVER_URL + '/service?request=GetCapabilities']
with open(SERVICE_EXCEPTION_FILE, 'rb') as fp:
capabilities_doc = fp.read()
-@@ -66,6 +76,9 @@ class TestUtilWMSCapabilities(object):
+@@ -65,6 +75,9 @@ class TestUtilWMSCapabilities(object):
assert 'Not a capabilities document' in error_msg
def test_parse_capabilities(self):
@@ -52,7 +52,7 @@ Forwarded: not-needed
self.args = ['command_dummy', '--host', TESTSERVER_URL + '/service?request=GetCapabilities', '--version', '1.1.1']
with open(CAPABILITIES111_FILE, 'rb') as fp:
capabilities_doc = fp.read()
-@@ -77,6 +90,9 @@ class TestUtilWMSCapabilities(object):
+@@ -76,6 +89,9 @@ class TestUtilWMSCapabilities(object):
assert lines[1].startswith('Capabilities Document Version 1.1.1')
def test_parse_130capabilities(self):
@@ -62,7 +62,7 @@ Forwarded: not-needed
self.args = ['command_dummy', '--host', TESTSERVER_URL + '/service?request=GetCapabilities', '--version', '1.3.0']
with open(CAPABILITIES130_FILE, 'rb') as fp:
capabilities_doc = fp.read()
-@@ -88,6 +104,9 @@ class TestUtilWMSCapabilities(object):
+@@ -87,6 +103,9 @@ class TestUtilWMSCapabilities(object):
assert lines[1].startswith('Capabilities Document Version 1.3.0')
def test_key_error(self):
@@ -74,7 +74,7 @@ Forwarded: not-needed
capabilities_doc = fp.read()
--- a/mapproxy/test/unit/test_cache.py
+++ b/mapproxy/test/unit/test_cache.py
-@@ -56,6 +56,7 @@ from mapproxy.test.http import assert_qu
+@@ -55,6 +55,7 @@ from mapproxy.test.http import assert_qu
from collections import defaultdict
from nose.tools import eq_, raises, assert_not_equal, assert_raises
@@ -82,7 +82,7 @@ Forwarded: not-needed
TEST_SERVER_ADDRESS = ('127.0.0.1', 56413)
GLOBAL_GEOGRAPHIC_EXTENT = MapExtent((-180, -90, 180, 90), SRS(4326))
-@@ -744,6 +745,9 @@ class TestWMSSourceWithClient(object):
+@@ -743,6 +744,9 @@ class TestWMSSourceWithClient(object):
self.source = WMSSource(self.client)
def test_get_map(self):
@@ -92,7 +92,7 @@ Forwarded: not-needed
with tmp_image((512, 512)) as img:
expected_req = ({'path': r'/service?LAYERS=foo&SERVICE=WMS&FORMAT=image%2Fpng'
'&REQUEST=GetMap&HEIGHT=512&SRS=EPSG%3A4326&styles='
-@@ -757,6 +761,9 @@ class TestWMSSourceWithClient(object):
+@@ -756,6 +760,9 @@ class TestWMSSourceWithClient(object):
assert is_png(result.as_buffer(seekable=True))
eq_(result.as_image().size, (512, 512))
def test_get_map_non_image_content_type(self):
@@ -102,7 +102,7 @@ Forwarded: not-needed
with tmp_image((512, 512)) as img:
expected_req = ({'path': r'/service?LAYERS=foo&SERVICE=WMS&FORMAT=image%2Fpng'
'&REQUEST=GetMap&HEIGHT=512&SRS=EPSG%3A4326&styles='
-@@ -771,6 +778,9 @@ class TestWMSSourceWithClient(object):
+@@ -770,6 +777,9 @@ class TestWMSSourceWithClient(object):
else:
assert False, 'no SourceError raised'
def test_basic_auth(self):
@@ -112,7 +112,7 @@ Forwarded: not-needed
http_client = HTTPClient(self.req_template.url, username='foo', password='bar@')
self.client.http_client = http_client
def assert_auth(req_handler):
-@@ -937,4 +947,4 @@ class TestNeastedConditionalLayers(objec
+@@ -935,4 +945,4 @@ class TestNeastedConditionalLayers(objec
assert self.l4326.requested
def test_resolution_low_projected(self):
self.layer.get_map(MapQuery((0, 0, 10000, 10000), (100, 100), SRS(31467)))
@@ -121,7 +121,7 @@ Forwarded: not-needed
+ assert self.l900913.requested
--- a/mapproxy/test/unit/test_client.py
+++ b/mapproxy/test/unit/test_client.py
-@@ -43,11 +43,17 @@ class TestHTTPClient(object):
+@@ -42,11 +42,17 @@ class TestHTTPClient(object):
self.client = HTTPClient()
def test_post(self):
@@ -139,47 +139,96 @@ Forwarded: not-needed
try:
with mock_httpd(TESTSERVER_ADDRESS, [({'path': '/'},
{'status': '500', 'body': b''})]):
-@@ -87,6 +93,9 @@ class TestHTTPClient(object):
+@@ -56,6 +62,9 @@ class TestHTTPClient(object):
+ else:
+ assert False, 'expected HTTPClientError'
+ def test_invalid_url_type(self):
++ if 'OFFLINE_TESTS' in os.environ:
++ raise SkipTest
++
+ try:
+ self.client.open('htp://example.org')
+ except HTTPClientError as e:
+@@ -63,6 +72,9 @@ class TestHTTPClient(object):
+ else:
+ assert False, 'expected HTTPClientError'
+ def test_invalid_url(self):
++ if 'OFFLINE_TESTS' in os.environ:
++ raise SkipTest
++
+ try:
+ self.client.open('this is not a url')
+ except HTTPClientError as e:
+@@ -70,6 +82,9 @@ class TestHTTPClient(object):
+ else:
+ assert False, 'expected HTTPClientError'
+ def test_unknown_host(self):
++ if 'OFFLINE_TESTS' in os.environ:
++ raise SkipTest
++
+ try:
+ self.client.open('http://thishostshouldnotexist000136really42.org')
+ except HTTPClientError as e:
+@@ -77,6 +92,9 @@ class TestHTTPClient(object):
+ else:
+ assert False, 'expected HTTPClientError'
+ def test_no_connect(self):
++ if 'OFFLINE_TESTS' in os.environ:
++ raise SkipTest
++
+ try:
+ self.client.open('http://localhost:53871')
+ except HTTPClientError as e:
+@@ -86,6 +104,9 @@ class TestHTTPClient(object):
@attr('online')
- def test_https_no_ssl_module_error(self):
+ def test_https_untrusted_root(self):
+ if 'OFFLINE_TESTS' in os.environ:
+ raise SkipTest
+
- from mapproxy.client import http
- old_ssl = http.ssl
- try:
-@@ -102,6 +111,9 @@ class TestHTTPClient(object):
+ if not supports_ssl_default_context:
+ # old python versions require ssl_ca_certs
+ raise SkipTest()
+@@ -97,12 +118,18 @@ class TestHTTPClient(object):
@attr('online')
- def test_https_no_ssl_module_insecure(self):
+ def test_https_insecure(self):
+ if 'OFFLINE_TESTS' in os.environ:
+ raise SkipTest
+
- from mapproxy.client import http
- old_ssl = http.ssl
- try:
-@@ -113,6 +125,9 @@ class TestHTTPClient(object):
+ self.client = HTTPClient(
+ 'https://untrusted-root.badssl.com/', insecure=True)
+ self.client.open('https://untrusted-root.badssl.com/')
@attr('online')
- def test_https_valid_cert(self):
+ def test_https_valid_ca_cert_file(self):
+ if 'OFFLINE_TESTS' in os.environ:
+ raise SkipTest
+
- try:
- import ssl; ssl
- except ImportError:
-@@ -131,6 +146,9 @@ class TestHTTPClient(object):
+ # verify with fixed ca_certs file
+ cert_file = '/etc/ssl/certs/ca-certificates.crt'
+ if os.path.exists(cert_file):
+@@ -117,6 +144,9 @@ class TestHTTPClient(object):
+
+ @attr('online')
+ def test_https_valid_default_cert(self):
++ if 'OFFLINE_TESTS' in os.environ:
++ raise SkipTest
++
+ # modern python should verify by default
+ if not supports_ssl_default_context:
+ raise SkipTest()
+@@ -125,6 +155,9 @@ class TestHTTPClient(object):
@attr('online')
def test_https_invalid_cert(self):
+ if 'OFFLINE_TESTS' in os.environ:
+ raise SkipTest
+
- try:
- import ssl; ssl
- except ImportError:
-@@ -144,6 +162,9 @@ class TestHTTPClient(object):
+ # load 'wrong' root cert
+ with TempFile() as tmp:
+ with open(tmp, 'wb') as f:
+@@ -137,6 +170,9 @@ class TestHTTPClient(object):
assert_re(e.args[0], r'Could not verify connection to URL')
def test_timeouts(self):
@@ -189,7 +238,7 @@ Forwarded: not-needed
test_req = ({'path': '/', 'req_assert_function': lambda x: time.sleep(0.9) or True},
{'body': b'nothing'})
-@@ -209,6 +230,9 @@ class TestTMSClient(object):
+@@ -240,6 +276,9 @@ class TestTMSClient(object):
def setup(self):
self.client = TMSClient(TESTSERVER_URL)
def test_get_tile(self):
@@ -199,7 +248,7 @@ Forwarded: not-needed
with mock_httpd(TESTSERVER_ADDRESS, [({'path': '/9/5/13.png'},
{'body': b'tile', 'headers': {'content-type': 'image/png'}})]):
resp = self.client.get_tile((5, 13, 9)).source.read()
-@@ -216,6 +240,9 @@ class TestTMSClient(object):
+@@ -247,6 +286,9 @@ class TestTMSClient(object):
class TestTileClient(object):
def test_tc_path(self):
@@ -209,7 +258,7 @@ Forwarded: not-needed
template = TileURLTemplate(TESTSERVER_URL + '/%(tc_path)s.png')
client = TileClient(template)
with mock_httpd(TESTSERVER_ADDRESS, [({'path': '/09/000/000/005/000/000/013.png'},
-@@ -225,6 +252,9 @@ class TestTileClient(object):
+@@ -256,6 +298,9 @@ class TestTileClient(object):
eq_(resp, b'tile')
def test_quadkey(self):
@@ -219,7 +268,7 @@ Forwarded: not-needed
template = TileURLTemplate(TESTSERVER_URL + '/key=%(quadkey)s&format=%(format)s')
client = TileClient(template)
with mock_httpd(TESTSERVER_ADDRESS, [({'path': '/key=000002303&format=png'},
-@@ -233,6 +263,9 @@ class TestTileClient(object):
+@@ -264,6 +309,9 @@ class TestTileClient(object):
resp = client.get_tile((5, 13, 9)).source.read()
eq_(resp, b'tile')
def test_xyz(self):
@@ -229,7 +278,7 @@ Forwarded: not-needed
template = TileURLTemplate(TESTSERVER_URL + '/x=%(x)s&y=%(y)s&z=%(z)s&format=%(format)s')
client = TileClient(template)
with mock_httpd(TESTSERVER_ADDRESS, [({'path': '/x=5&y=13&z=9&format=png'},
-@@ -242,6 +275,9 @@ class TestTileClient(object):
+@@ -273,6 +321,9 @@ class TestTileClient(object):
eq_(resp, b'tile')
def test_arcgiscache_path(self):
@@ -239,7 +288,7 @@ Forwarded: not-needed
template = TileURLTemplate(TESTSERVER_URL + '/%(arcgiscache_path)s.png')
client = TileClient(template)
with mock_httpd(TESTSERVER_ADDRESS, [({'path': '/L09/R0000000d/C00000005.png'},
-@@ -251,6 +287,9 @@ class TestTileClient(object):
+@@ -282,6 +333,9 @@ class TestTileClient(object):
eq_(resp, b'tile')
def test_bbox(self):
@@ -251,16 +300,16 @@ Forwarded: not-needed
client = TileClient(template, grid=grid)
--- a/mapproxy/test/unit/test_tiled_source.py
+++ b/mapproxy/test/unit/test_tiled_source.py
-@@ -15,6 +15,8 @@
+@@ -14,6 +14,8 @@
+ # limitations under the License.
- from __future__ import with_statement
+import os
+
from mapproxy.client.tile import TMSClient
from mapproxy.grid import TileGrid
from mapproxy.srs import SRS
-@@ -24,6 +26,7 @@ from mapproxy.layer import MapQuery
+@@ -23,6 +25,7 @@ from mapproxy.layer import MapQuery
from mapproxy.test.http import mock_httpd
from nose.tools import eq_
@@ -268,7 +317,7 @@ Forwarded: not-needed
TEST_SERVER_ADDRESS = ('127.0.0.1', 56413)
TESTSERVER_URL = 'http://%s:%d' % TEST_SERVER_ADDRESS
-@@ -34,6 +37,9 @@ class TestTileClientOnError(object):
+@@ -33,6 +36,9 @@ class TestTileClientOnError(object):
self.client = TMSClient(TESTSERVER_URL)
def test_cacheable_response(self):
@@ -278,7 +327,7 @@ Forwarded: not-needed
error_handler = HTTPSourceErrorHandler()
error_handler.add_handler(500, (255, 0, 0), cacheable=True)
self.source = TiledSource(self.grid, self.client, error_handler=error_handler)
-@@ -45,6 +51,9 @@ class TestTileClientOnError(object):
+@@ -44,6 +50,9 @@ class TestTileClientOnError(object):
eq_(resp.as_image().getcolors(), [((256*256), (255, 0, 0))])
def test_image_response(self):
@@ -288,7 +337,7 @@ Forwarded: not-needed
error_handler = HTTPSourceErrorHandler()
error_handler.add_handler(500, (255, 0, 0), cacheable=False)
self.source = TiledSource(self.grid, self.client, error_handler=error_handler)
-@@ -56,6 +65,9 @@ class TestTileClientOnError(object):
+@@ -55,6 +64,9 @@ class TestTileClientOnError(object):
eq_(resp.as_image().getcolors(), [((256*256), (255, 0, 0))])
def test_multiple_image_responses(self):
@@ -300,7 +349,7 @@ Forwarded: not-needed
error_handler.add_handler(204, (255, 0, 127, 200), cacheable=True)
--- a/mapproxy/test/system/test_seed.py
+++ b/mapproxy/test/system/test_seed.py
-@@ -32,6 +32,7 @@ from mapproxy.test.http import mock_http
+@@ -31,6 +31,7 @@ from mapproxy.test.http import mock_http
from mapproxy.test.image import tmp_image, create_tmp_image_buf, create_tmp_image
from nose.tools import eq_
@@ -308,7 +357,7 @@ Forwarded: not-needed
FIXTURE_DIR = os.path.join(os.path.dirname(__file__), 'fixture')
-@@ -357,6 +358,9 @@ class TestConcurrentRequestsSeed(SeedTes
+@@ -356,6 +357,9 @@ class TestConcurrentRequestsSeed(SeedTes
empty_ogrdata = 'empty_ogrdata.geojson'
def test_timeout(self):
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/mapproxy.git
More information about the Pkg-grass-devel
mailing list