From b931a6473ee929193c0048640bf34876ce831a15 Mon Sep 17 00:00:00 2001 From: Chad Smith Date: Tue, 29 Aug 2017 10:32:38 -0600 Subject: url_helper: dynamically import oauthlib import from inside oauth_headers oauth_headers is the only function which requires oauthlib, move the import and ImportError handling inside this function to only attempt loading at runtime if called. This will allow us to build on platforms that don't have python-oauthlib installed by default. Add simple unittests around the missing oauthlib dependencies to make sure the function performs as intended and raises and NotImplementedError if oauthlib can't be imported. --- cloudinit/tests/__init__.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 cloudinit/tests/__init__.py (limited to 'cloudinit/tests/__init__.py') diff --git a/cloudinit/tests/__init__.py b/cloudinit/tests/__init__.py new file mode 100644 index 00000000..e69de29b -- cgit v1.2.3