summaryrefslogtreecommitdiff
path: root/tests/unittests/test_handler/test_handler_locale.py
diff options
context:
space:
mode:
authorChad Smith <chad.smith@canonical.com>2017-08-29 10:32:38 -0600
committerScott Moser <smoser@brickies.net>2017-08-30 15:41:17 -0400
commitb931a6473ee929193c0048640bf34876ce831a15 (patch)
tree319c9bdb5f5d109c24a338cca168e8f1c92e12ab /tests/unittests/test_handler/test_handler_locale.py
parent502082f6f21fb7592a798087a4c49f90d886ad14 (diff)
downloadvyos-cloud-init-b931a6473ee929193c0048640bf34876ce831a15.tar.gz
vyos-cloud-init-b931a6473ee929193c0048640bf34876ce831a15.zip
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.
Diffstat (limited to 'tests/unittests/test_handler/test_handler_locale.py')
0 files changed, 0 insertions, 0 deletions