Hello community,

here is the log from the commit of package python-zeep for openSUSE:Factory 
checked in at 2019-03-26 15:44:40
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-zeep (Old)
 and      /work/SRC/openSUSE:Factory/.python-zeep.new.25356 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-zeep"

Tue Mar 26 15:44:40 2019 rev:3 rq:688250 version:3.3.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-zeep/python-zeep.changes  2019-02-26 
22:22:47.610057802 +0100
+++ /work/SRC/openSUSE:Factory/.python-zeep.new.25356/python-zeep.changes       
2019-03-26 15:44:51.432119233 +0100
@@ -1,0 +2,12 @@
+Mon Mar 25 11:43:38 UTC 2019 - [email protected]
+
+- version update to 3.3.1
+ * Fix issue with empty xsd:import statements on Python 2.7 (#930)
+ * Extend the force_https flag to also force loading xsd files from https when
+   a http url is encountered from a https domain
+ * Fix handling recursive xsd imports when the url's are enforced from http to
+   https.
+ * Fix reference attribute when using the Binary Security Token (#873)
+ * Add support for the WSAM namespace (#890)
+
+-------------------------------------------------------------------

Old:
----
  zeep-3.2.0.tar.gz

New:
----
  zeep-3.3.1.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-zeep.spec ++++++
--- /var/tmp/diff_new_pack.Go8nb2/_old  2019-03-26 15:44:52.396118104 +0100
+++ /var/tmp/diff_new_pack.Go8nb2/_new  2019-03-26 15:44:52.396118104 +0100
@@ -18,7 +18,7 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-zeep
-Version:        3.2.0
+Version:        3.3.1
 Release:        0
 Summary:        A Python SOAP client based on lxml/requests
 License:        MIT
@@ -74,10 +74,9 @@
 %prep
 %setup -q -n zeep-%{version}
 # disable broken tests
-rm -f tests/test_wsse_signature.py
-rm -f tests/test_wsse_username.py
-rm -f tests/test_wsse_utils.py
-rm -r tests/test_tornado_transport.py
+rm tests/test_wsse_signature.py
+rm tests/test_wsse_username.py
+rm tests/test_wsse_utils.py
 
 %build
 %python_build

++++++ zeep-3.2.0.tar.gz -> zeep-3.3.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zeep-3.2.0/CHANGES new/zeep-3.3.1/CHANGES
--- old/zeep-3.2.0/CHANGES      2018-12-17 09:47:28.000000000 +0100
+++ new/zeep-3.3.1/CHANGES      2019-03-10 07:49:27.000000000 +0100
@@ -1,3 +1,18 @@
+3.3.1 (2019-03-10)
+------------------
+ - Fix issue with empty xsd:import statements on Python 2.7 (#930)
+
+
+3.3.0 (2019-03-08)
+------------------
+ - Extend the force_https flag to also force loading xsd files from https when
+   a http url is encountered from a https domain
+ - Fix handling recursive xsd imports when the url's are enforced from http to
+   https.
+ - Fix reference attribute when using the Binary Security Token (#873)
+ - Add support for the WSAM namespace (#890)
+
+
 3.2.0 (2018-12-17)
 ------------------
  - Fix abstract message check for NoneType before attempting to access parts
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zeep-3.2.0/PKG-INFO new/zeep-3.3.1/PKG-INFO
--- old/zeep-3.2.0/PKG-INFO     2018-12-17 10:05:53.000000000 +0100
+++ new/zeep-3.3.1/PKG-INFO     2019-03-10 08:01:43.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: zeep
-Version: 3.2.0
+Version: 3.3.1
 Summary: A modern/fast Python SOAP client based on lxml / requests
 Home-page: http://docs.python-zeep.org
 Author: Michael van Tellingen
@@ -76,8 +76,8 @@
 Classifier: Programming Language :: Python :: 3.7
 Classifier: Programming Language :: Python :: Implementation :: CPython
 Classifier: Programming Language :: Python :: Implementation :: PyPy
-Provides-Extra: async
-Provides-Extra: tornado
+Provides-Extra: test
 Provides-Extra: docs
+Provides-Extra: tornado
 Provides-Extra: xmlsec
-Provides-Extra: test
+Provides-Extra: async
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zeep-3.2.0/README.rst new/zeep-3.3.1/README.rst
--- old/zeep-3.2.0/README.rst   2018-12-17 09:52:45.000000000 +0100
+++ new/zeep-3.3.1/README.rst   2019-03-04 16:43:11.000000000 +0100
@@ -27,11 +27,8 @@
 .. image:: https://readthedocs.org/projects/python-zeep/badge/?version=latest
     :target: https://readthedocs.org/projects/python-zeep/
    
-.. image:: https://travis-ci.org/mvantellingen/python-zeep.svg?branch=master
-    :target: https://travis-ci.org/mvantellingen/python-zeep
-
-.. image:: 
https://ci.appveyor.com/api/projects/status/im609ng9h29vt89r?svg=true
-    :target: https://ci.appveyor.com/project/mvantellingen/python-zeep
+.. image:: 
https://dev.azure.com/mvantellingen/zeep/_apis/build/status/python-zeep?branchName=master
+    :target: https://dev.azure.com/mvantellingen/zeep/_build?definitionId=1
 
 .. image:: 
http://codecov.io/github/mvantellingen/python-zeep/coverage.svg?branch=master 
     :target: http://codecov.io/github/mvantellingen/python-zeep?branch=master
@@ -39,9 +36,6 @@
 .. image:: https://img.shields.io/pypi/v/zeep.svg
     :target: https://pypi.python.org/pypi/zeep/
 
-.. image:: 
https://requires.io/github/mvantellingen/python-zeep/requirements.svg?branch=master
-     :target: 
https://requires.io/github/mvantellingen/python-zeep/requirements/?branch=master
-
 .. end-no-pypi
 
 Installation
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zeep-3.2.0/setup.cfg new/zeep-3.3.1/setup.cfg
--- old/zeep-3.2.0/setup.cfg    2018-12-17 10:05:53.000000000 +0100
+++ new/zeep-3.3.1/setup.cfg    2019-03-10 08:01:43.000000000 +0100
@@ -1,5 +1,5 @@
 [bumpversion]
-current_version = 3.2.0
+current_version = 3.3.1
 commit = true
 tag = true
 tag_name = {new_version}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zeep-3.2.0/setup.py new/zeep-3.3.1/setup.py
--- old/zeep-3.2.0/setup.py     2018-12-17 09:59:37.000000000 +0100
+++ new/zeep-3.3.1/setup.py     2019-03-10 07:55:00.000000000 +0100
@@ -59,7 +59,7 @@
 
 setup(
     name='zeep',
-    version='3.2.0',
+    version='3.3.1',
     description='A modern/fast Python SOAP client based on lxml / requests',
     long_description=long_description,
     author="Michael van Tellingen",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zeep-3.2.0/src/zeep/__init__.py 
new/zeep-3.3.1/src/zeep/__init__.py
--- old/zeep-3.2.0/src/zeep/__init__.py 2018-12-17 09:59:27.000000000 +0100
+++ new/zeep-3.3.1/src/zeep/__init__.py 2019-03-10 08:01:35.000000000 +0100
@@ -4,4 +4,4 @@
 from zeep.settings import Settings  # noqa
 from zeep.xsd.valueobjects import AnyObject  # noqa
 
-__version__ = '3.2.0'
+__version__ = '3.3.1'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zeep-3.2.0/src/zeep/asyncio/bindings.py 
new/zeep-3.3.1/src/zeep/asyncio/bindings.py
--- old/zeep-3.2.0/src/zeep/asyncio/bindings.py 2018-11-18 11:17:39.000000000 
+0100
+++ new/zeep-3.3.1/src/zeep/asyncio/bindings.py 2019-03-10 08:01:35.000000000 
+0100
@@ -14,6 +14,9 @@
         response = await client.transport.post_xml(
             options['address'], envelope, http_headers)
 
+        if client.settings.raw_response:
+            return response 
+     
         operation_obj = self.get(operation)
         return self.process_reply(client, operation_obj, response)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zeep-3.2.0/src/zeep/loader.py 
new/zeep-3.3.1/src/zeep/loader.py
--- old/zeep-3.2.0/src/zeep/loader.py   2018-11-18 11:17:39.000000000 +0100
+++ new/zeep-3.3.1/src/zeep/loader.py   2019-03-10 08:01:35.000000000 +0100
@@ -2,7 +2,7 @@
 
 from defusedxml.lxml import fromstring
 from lxml import etree
-from six.moves.urllib.parse import urljoin, urlparse
+from six.moves.urllib.parse import urljoin, urlparse, urlunparse
 
 from zeep.exceptions import XMLSyntaxError
 from zeep.settings import Settings
@@ -76,6 +76,33 @@
         content, transport, base_url, settings=settings)
 
 
+def normalize_location(settings, url, base_url):
+    """Return a 'normalized' url for the given url.
+
+    This will make the url absolute and force it to https when that setting is
+    enabled.
+
+    """
+    # Python 2.7 doesn't accept None to urlparse() calls, but Python 3 does.
+    # So as a guard convert None to '' here so that we can't introduce errors 
in
+    # Python 2.7 like #930. Can be removed when we drop Python 2 support.
+    if url is None:
+        url = ''
+
+    if base_url:
+        url = absolute_location(url, base_url)
+
+    if base_url and settings.force_https:
+        base_url_parts = urlparse(base_url)
+        url_parts = urlparse(url)
+        if (
+            base_url_parts.netloc == url_parts.netloc and
+            base_url_parts.scheme != url_parts.scheme
+        ):
+            url = urlunparse(('https',) + url_parts[1:])
+    return url
+
+
 def absolute_location(location, base):
     """Make an url absolute (if it is optional) via the passed base url.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zeep-3.2.0/src/zeep/wsdl/parse.py 
new/zeep-3.3.1/src/zeep/wsdl/parse.py
--- old/zeep-3.2.0/src/zeep/wsdl/parse.py       2018-12-17 09:25:21.000000000 
+0100
+++ new/zeep-3.3.1/src/zeep/wsdl/parse.py       2019-03-10 08:01:35.000000000 
+0100
@@ -12,6 +12,7 @@
 NSMAP = {
     'wsdl': 'http://schemas.xmlsoap.org/wsdl/',
     'wsaw': 'http://www.w3.org/2006/05/addressing/wsdl',
+    'wsam': 'http://www.w3.org/2007/05/addressing/metadata',
 }
 
 
@@ -118,7 +119,9 @@
         else:
             kwargs['fault_messages'][param_name] = param_value
 
-        wsa_action = msg_node.get(etree.QName(NSMAP['wsaw'], 'Action'))
+        wsa_action = msg_node.get(etree.QName(NSMAP['wsam'], 'Action'))
+        if not wsa_action:
+            wsa_action = msg_node.get(etree.QName(NSMAP['wsaw'], 'Action'))
         param_value.wsa_action = wsa_action
 
     kwargs['name'] = name
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zeep-3.2.0/src/zeep/wsse/signature.py 
new/zeep-3.3.1/src/zeep/wsse/signature.py
--- old/zeep-3.2.0/src/zeep/wsse/signature.py   2018-11-18 11:17:39.000000000 
+0100
+++ new/zeep-3.3.1/src/zeep/wsse/signature.py   2019-03-10 08:01:35.000000000 
+0100
@@ -72,7 +72,7 @@
 
 
 class BinarySignature(Signature):
-    """Sign given SOAP envelope with WSSE sig usign given key file and cert 
file.
+    """Sign given SOAP envelope with WSSE sig using given key file and cert 
file.
 
     Place the key information into BinarySecurityElement."""
 
@@ -233,13 +233,12 @@
     ref = etree.SubElement(sec_token_ref, QName(ns.WSSE, 'Reference'),
                            {'ValueType': 
'http://docs.oasis-open.org/wss/2004/01/'
                                          
'oasis-200401-wss-x509-token-profile-1.0#X509v3'})
-    ref_id = ensure_id(ref)
     bintok = etree.Element(QName(ns.WSSE, 'BinarySecurityToken'), {
-        QName(ns.WSU, 'Id'): ref_id,
         'ValueType': 'http://docs.oasis-open.org/wss/2004/01/'
                      'oasis-200401-wss-x509-token-profile-1.0#X509v3',
         'EncodingType': 'http://docs.oasis-open.org/wss/2004/01/'
                         
'oasis-200401-wss-soap-message-security-1.0#Base64Binary'})
+    ref.attrib['URI'] = '#' + ensure_id(bintok)
     bintok.text = x509_data.find(QName(ns.DS, 'X509Certificate')).text
     security.insert(1, bintok)
     x509_data.getparent().remove(x509_data)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zeep-3.2.0/src/zeep/xsd/visitor.py 
new/zeep-3.3.1/src/zeep/xsd/visitor.py
--- old/zeep-3.2.0/src/zeep/xsd/visitor.py      2018-12-17 09:25:21.000000000 
+0100
+++ new/zeep-3.3.1/src/zeep/xsd/visitor.py      2019-03-10 08:01:35.000000000 
+0100
@@ -5,7 +5,7 @@
 from lxml import etree
 
 from zeep.exceptions import XMLParseError
-from zeep.loader import absolute_location, load_external
+from zeep.loader import absolute_location, load_external, normalize_location
 from zeep.utils import as_qname, qname_attr
 from zeep.xsd import elements as xsd_elements
 from zeep.xsd import types as xsd_types
@@ -166,7 +166,9 @@
         namespace = node.get('namespace')
         location = node.get('schemaLocation')
         if location:
-            location = absolute_location(location, self.document._base_url)
+            location = normalize_location(
+                self.schema.settings, location, self.document._location
+            )
 
         if not namespace and not self.document._target_namespace:
             raise XMLParseError(
@@ -209,7 +211,8 @@
         # Load the XML
         schema_node = load_external(
             location,
-            self.schema._transport,
+            transport=self.schema._transport,
+            base_url=self.document._location,
             settings=self.schema.settings)
 
         # Check if the xsd:import namespace matches the targetNamespace. If
@@ -425,7 +428,7 @@
         # Check of wsdl:arayType
         array_type = node.get('{http://schemas.xmlsoap.org/wsdl/}arrayType')
         if array_type:
-            match = re.match('([^\[]+)', array_type)
+            match = re.match(r'([^\[]+)', array_type)
             if match:
                 array_type = match.groups()[0]
                 qname = as_qname(array_type, node.nsmap)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zeep-3.2.0/src/zeep.egg-info/PKG-INFO 
new/zeep-3.3.1/src/zeep.egg-info/PKG-INFO
--- old/zeep-3.2.0/src/zeep.egg-info/PKG-INFO   2018-12-17 10:05:52.000000000 
+0100
+++ new/zeep-3.3.1/src/zeep.egg-info/PKG-INFO   2019-03-10 08:01:43.000000000 
+0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: zeep
-Version: 3.2.0
+Version: 3.3.1
 Summary: A modern/fast Python SOAP client based on lxml / requests
 Home-page: http://docs.python-zeep.org
 Author: Michael van Tellingen
@@ -76,8 +76,8 @@
 Classifier: Programming Language :: Python :: 3.7
 Classifier: Programming Language :: Python :: Implementation :: CPython
 Classifier: Programming Language :: Python :: Implementation :: PyPy
-Provides-Extra: async
-Provides-Extra: tornado
+Provides-Extra: test
 Provides-Extra: docs
+Provides-Extra: tornado
 Provides-Extra: xmlsec
-Provides-Extra: test
+Provides-Extra: async
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zeep-3.2.0/src/zeep.egg-info/requires.txt 
new/zeep-3.3.1/src/zeep.egg-info/requires.txt
--- old/zeep-3.2.0/src/zeep.egg-info/requires.txt       2018-12-17 
10:05:52.000000000 +0100
+++ new/zeep-3.3.1/src/zeep.egg-info/requires.txt       2019-03-10 
08:01:43.000000000 +0100
@@ -10,7 +10,6 @@
 pytz
 
 [async]
-aiohttp>=1.0
 
 [docs]
 sphinx>=1.4.0
@@ -28,7 +27,6 @@
 flake8-blind-except==0.1.1
 flake8-debugger==1.4.0
 flake8-imports==0.1.1
-aioresponses>=0.4.1
 
 [tornado]
 tornado<5,>=4.0.2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zeep-3.2.0/tests/test_wsa.py 
new/zeep-3.3.1/tests/test_wsa.py
--- old/zeep-3.2.0/tests/test_wsa.py    2018-11-18 10:08:13.000000000 +0100
+++ new/zeep-3.3.1/tests/test_wsa.py    2019-03-10 08:01:35.000000000 +0100
@@ -267,3 +267,90 @@
 
     assert headers['Content-Type'] == (
         'application/soap+xml; charset=utf-8; action="urn:dummyRequest"')
+
+
+def test_require_wsa_new(recwarn, monkeypatch):
+    monkeypatch.setattr(
+        uuid, 'uuid4', lambda: 
uuid.UUID('ada686f9-5995-4088-bea4-239f694b2eaf'))
+
+    wsdl_main = StringIO("""
+        <?xml version="1.0"?>
+        <wsdl:definitions
+          xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
+          xmlns:xsd="http://www.w3.org/2001/XMLSchema";
+          xmlns:tns="http://tests.python-zeep.org/xsd-main";
+          xmlns:sec="http://tests.python-zeep.org/wsdl-secondary";
+          xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
+          xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata";
+          xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/";
+          targetNamespace="http://tests.python-zeep.org/xsd-main";>
+          <wsdl:types>
+            <xsd:schema
+                targetNamespace="http://tests.python-zeep.org/xsd-main";
+                xmlns:tns="http://tests.python-zeep.org/xsd-main";>
+              <xsd:element name="input" type="xsd:string"/>
+              <xsd:element name="input2" type="xsd:string"/>
+            </xsd:schema>
+          </wsdl:types>
+
+          <wsdl:message name="dummyRequest">
+            <wsdl:part name="response" element="tns:input"/>
+          </wsdl:message>
+          <wsdl:message name="dummyResponse">
+            <wsdl:part name="response" element="tns:input2"/>
+          </wsdl:message>
+
+          <wsdl:portType name="TestPortType">
+            <wsdl:operation name="TestOperation1">
+              <wsdl:input message="dummyRequest" 
wsam:Action="urn:dummyRequest"/>
+              <wsdl:output message="dummyResponse"  
wsam:Action="urn:dummyResponse"/>
+            </wsdl:operation>
+          </wsdl:portType>
+
+          <wsdl:binding name="TestBinding" type="tns:TestPortType">
+            <soap:binding style="document" 
transport="http://schemas.xmlsoap.org/soap/http"/>
+            <wsdl:operation name="TestOperation1">
+              <soap:operation soapAction=""/>
+              <wsdl:input>
+                <soap:body use="literal"/>
+              </wsdl:input>
+              <wsdl:output>
+                <soap:body use="literal"/>
+              </wsdl:output>
+            </wsdl:operation>
+          </wsdl:binding>
+          <wsdl:service name="TestService">
+            <wsdl:documentation>Test service</wsdl:documentation>
+            <wsdl:port name="TestPortType" binding="tns:TestBinding">
+              <soap:address location="http://tests.python-zeep.org/test"/>
+            </wsdl:port>
+          </wsdl:service>
+        </wsdl:definitions>
+    """.strip())
+
+    client = stub(plugins=[], wsse=None)
+
+    transport = DummyTransport()
+    client = Client(wsdl_main, transport=transport)
+    binding = 
client.wsdl.services.get('TestService').ports.get('TestPortType').binding
+
+    envelope, headers = binding._create(
+        'TestOperation1',
+        args=['foo'],
+        kwargs={},
+        client=client,
+        options={'address': 'http://tests.python-zeep.org/test'})
+    expected = """
+        <soap-env:Envelope
+            xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/";>
+          <soap-env:Header  xmlns:wsa="http://www.w3.org/2005/08/addressing";>
+            <wsa:Action>urn:dummyRequest</wsa:Action>
+            
<wsa:MessageID>urn:uuid:ada686f9-5995-4088-bea4-239f694b2eaf</wsa:MessageID>
+            <wsa:To>http://tests.python-zeep.org/test</wsa:To>
+          </soap-env:Header>
+          <soap-env:Body>
+            <ns0:input 
xmlns:ns0="http://tests.python-zeep.org/xsd-main";>foo</ns0:input>
+          </soap-env:Body>
+        </soap-env:Envelope>
+    """
+    assert_nodes_equal(expected, envelope)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zeep-3.2.0/tests/test_wsdl.py 
new/zeep-3.3.1/tests/test_wsdl.py
--- old/zeep-3.2.0/tests/test_wsdl.py   2018-12-17 09:25:21.000000000 +0100
+++ new/zeep-3.3.1/tests/test_wsdl.py   2019-03-10 08:01:35.000000000 +0100
@@ -1156,3 +1156,110 @@
     document = wsdl.Document(wsdl_main, transport)
     document.dump()
 
+
+def test_import_cyclic():
+    node_a = etree.fromstring("""
+        <?xml version="1.0"?>
+        <xs:schema
+            xmlns:xs="http://www.w3.org/2001/XMLSchema";
+            xmlns:tns="http://tests.python-zeep.org/a";
+            targetNamespace="http://tests.python-zeep.org/a";
+            xmlns:b="http://tests.python-zeep.org/b";
+            elementFormDefault="qualified">
+
+            <xs:import
+                schemaLocation="http://tests.python-zeep.org/b.xsd";
+                namespace="http://tests.python-zeep.org/b"/>
+
+        </xs:schema>
+    """.strip())
+
+    node_b = etree.fromstring("""
+        <?xml version="1.0"?>
+        <xs:schema
+            xmlns:xs="http://www.w3.org/2001/XMLSchema";
+            xmlns:tns="http://tests.python-zeep.org/b";
+            targetNamespace="http://tests.python-zeep.org/b";
+            elementFormDefault="qualified">
+
+            <xs:import
+                schemaLocation="http://tests.python-zeep.org/a.xsd";
+                namespace="http://tests.python-zeep.org/a"/>
+            <xs:element name="bar" type="xs:string"/>
+        </xs:schema>
+    """.strip())
+
+    wsdl_content = StringIO("""
+    <?xml version='1.0'?>
+    <definitions
+        xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
+        xmlns:tns="http://tests.python-zeep.org/root";
+        xmlns:xsd="http://www.w3.org/2001/XMLSchema";
+        xmlns="http://schemas.xmlsoap.org/wsdl/"; 
targetNamespace="http://tests.python-zeep.org/root"; name="root">
+        <types>
+          <xsd:schema
+              xmlns:xs="http://www.w3.org/2001/XMLSchema";
+              xmlns:tns="http://tests.python-zeep.org/b";
+              targetNamespace="http://tests.python-zeep.org/b";
+              elementFormDefault="qualified">
+
+              <xs:import
+                  schemaLocation="http://tests.python-zeep.org/a.xsd";
+                  namespace="http://tests.python-zeep.org/a"/>
+              <xs:import
+                  schemaLocation="http://tests.python-zeep.org/b.xsd";
+                  namespace="http://tests.python-zeep.org/b"/>
+
+              <xs:element name="foo" type="xs:string"/>
+          </xsd:schema>
+        </types>
+    </definitions>
+    """.strip())
+
+    transport = DummyTransport()
+    transport.bind('https://tests.python-zeep.org/a.xsd', node_a)
+    transport.bind('https://tests.python-zeep.org/b.xsd', node_b)
+
+    document = wsdl.Document(
+        wsdl_content, transport, 'https://tests.python-zeep.org/content.wsdl')
+
+
+def test_import_no_location():
+    node_a = etree.fromstring("""
+        <?xml version="1.0"?>
+        <xs:schema
+            xmlns:xs="http://www.w3.org/2001/XMLSchema";
+            xmlns:tns="http://tests.python-zeep.org/a";
+            targetNamespace="http://tests.python-zeep.org/a";
+            xmlns:b="http://tests.python-zeep.org/b";
+            elementFormDefault="qualified">
+
+        </xs:schema>
+    """.strip())
+
+    wsdl_content = StringIO("""
+    <?xml version='1.0'?>
+    <definitions
+        xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
+        xmlns:tns="http://tests.python-zeep.org/root";
+        xmlns:xsd="http://www.w3.org/2001/XMLSchema";
+        xmlns="http://schemas.xmlsoap.org/wsdl/"; 
targetNamespace="http://tests.python-zeep.org/root"; name="root">
+        <types>
+          <xsd:schema
+              xmlns:xs="http://www.w3.org/2001/XMLSchema";
+              xmlns:tns="http://tests.python-zeep.org/b";
+              targetNamespace="http://tests.python-zeep.org/b";
+              elementFormDefault="qualified">
+
+              <xs:import namespace="http://tests.python-zeep.org/a"/>
+              <xs:element name="foo" type="xs:string"/>
+          </xsd:schema>
+        </types>
+    </definitions>
+    """.strip())
+
+    transport = DummyTransport()
+    transport.bind('https://tests.python-zeep.org/a.xsd', node_a)
+
+    document = wsdl.Document(
+        wsdl_content, transport, 'https://tests.python-zeep.org/content.wsdl')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zeep-3.2.0/tests/test_wsse_signature.py 
new/zeep-3.3.1/tests/test_wsse_signature.py
--- old/zeep-3.2.0/tests/test_wsse_signature.py 2018-11-18 10:08:17.000000000 
+0100
+++ new/zeep-3.3.1/tests/test_wsse_signature.py 2019-03-10 08:01:35.000000000 
+0100
@@ -3,8 +3,9 @@
 
 import pytest
 
+from lxml.etree import QName
 from tests.utils import load_xml
-from zeep import wsse
+from zeep import ns, wsse
 from zeep.exceptions import SignatureVerificationFailed
 from zeep.wsse import signature
 
@@ -135,3 +136,10 @@
     plugin = wsse.BinarySignature(KEY_FILE_PW, KEY_FILE_PW, 'geheim')
     envelope, headers = plugin.apply(envelope, {})
     plugin.verify(envelope)
+    # Test the reference
+    bintok = 
envelope.xpath('soapenv:Header/wsse:Security/wsse:BinarySecurityToken',
+                            namespaces={'soapenv': ns.SOAP_ENV_11, 'wsse': 
ns.WSSE})[0]
+    ref = 
envelope.xpath('soapenv:Header/wsse:Security/ds:Signature/ds:KeyInfo/wsse:SecurityTokenReference'
+                         '/wsse:Reference',
+                         namespaces={'soapenv': ns.SOAP_ENV_11, 'wsse': 
ns.WSSE, 'ds': ns.DS})[0]
+    assert '#' + bintok.attrib[QName(ns.WSU, 'Id')] == ref.attrib['URI']


Reply via email to