summaryrefslogtreecommitdiff
path: root/tests/unittests/test_datasource/test_gce.py
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2015-03-04 17:10:52 -0500
committerScott Moser <smoser@ubuntu.com>2015-03-04 17:10:52 -0500
commit978991f5793f639f24c95df3beca5e4cdf98fd9c (patch)
treeb56e04c278b666b4d188ad5160d60044c4a6372d /tests/unittests/test_datasource/test_gce.py
parent56a594cb47342b89629e0876bd63b4e724d5e1a2 (diff)
parent04a60cf949e085f06fa1f93b39a74b8d288f0e2e (diff)
downloadvyos-cloud-init-978991f5793f639f24c95df3beca5e4cdf98fd9c.tar.gz
vyos-cloud-init-978991f5793f639f24c95df3beca5e4cdf98fd9c.zip
Fix hang caused by HTTPretty on Python 3.4.2.
HTTPretty can causes hangs on Python 3.4.2 (and maybe Python 3.4.1), due to a Python bug (fixed in Python 3.4.3). This works around the problem in the appropriate Python versions. See https://github.com/gabrielfalcao/HTTPretty/pull/193 and https://github.com/gabrielfalcao/HTTPretty/issues/221 for details.
Diffstat (limited to 'tests/unittests/test_datasource/test_gce.py')
-rw-r--r--tests/unittests/test_datasource/test_gce.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/unittests/test_datasource/test_gce.py b/tests/unittests/test_datasource/test_gce.py
index d28f3b08..4280abc4 100644
--- a/tests/unittests/test_datasource/test_gce.py
+++ b/tests/unittests/test_datasource/test_gce.py
@@ -15,7 +15,6 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-import httpretty
import re
from base64 import b64encode, b64decode
@@ -27,6 +26,8 @@ from cloudinit.sources import DataSourceGCE
from .. import helpers as test_helpers
+httpretty = test_helpers.import_httpretty()
+
GCE_META = {
'instance/id': '123',
'instance/zone': 'foo/bar',