Update hacking for Python3
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.
Fix problems found.
The tempest plugin is used on older branches as well.
We really only need hacking on master anyways,
where we no longer support python 2, so here we
make the requirement specific to python 3.
Change-Id: Ia1a3c7cf9f48b30ca800c59078f38f2a22c1a0da
diff --git a/keystone_tempest_plugin/tests/scenario/test_federated_authentication.py b/keystone_tempest_plugin/tests/scenario/test_federated_authentication.py
index e930205..068b67a 100644
--- a/keystone_tempest_plugin/tests/scenario/test_federated_authentication.py
+++ b/keystone_tempest_plugin/tests/scenario/test_federated_authentication.py
@@ -119,9 +119,9 @@
self._setup_protocol()
def _str_from_xml(self, xml, path):
- l = xml.xpath(path, namespaces=self.ECP_SAML2_NAMESPACES)
- self.assertEqual(1, len(l))
- return l[0]
+ item = xml.xpath(path, namespaces=self.ECP_SAML2_NAMESPACES)
+ self.assertEqual(1, len(item))
+ return item[0]
def _get_sp_authn_request(self):
resp = self.saml2_client.send_service_provider_request(
diff --git a/test-requirements.txt b/test-requirements.txt
index 4b13fd1..16165e0 100644
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -2,7 +2,7 @@
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
-hacking>=1.1.0,<1.2.0 # Apache-2.0
+hacking>=3.0,<3.1.0;python_version>='3.5' # Apache-2.0
sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD
openstackdocstheme>=1.18.1 # Apache-2.0