Merge ~chad.smith/cloud-init:unittest-oauthlib-import into cloud-init:master
Proposed by
Chad Smith
Status: | Merged |
---|---|
Approved by: | Scott Moser |
Approved revision: | b1a44ee8f90214d348198c6bd81288e4888acbef |
Merged at revision: | b931a6473ee929193c0048640bf34876ce831a15 |
Proposed branch: | ~chad.smith/cloud-init:unittest-oauthlib-import |
Merge into: | cloud-init:master |
Diff against target: |
79 lines (+43/-7) 3 files modified
cloudinit/tests/__init__.py (+0/-0) cloudinit/tests/test_url_helper.py (+40/-0) cloudinit/url_helper.py (+3/-7) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Scott Moser | Approve | ||
Server Team CI bot | continuous-integration | Approve | |
Review via email: mp+329872@code.launchpad.net |
Description of the change
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.
To post a comment you must log in.
FAILED: Continuous integration, rev:87973cd2f2b baed380c01dbb08 2246d90a76446d /jenkins. ubuntu. com/server/ job/cloud- init-ci/ 226/
https:/
Executed test runs:
SUCCESS: Checkout
FAILED: Unit & Style Tests
Click here to trigger a rebuild: /jenkins. ubuntu. com/server/ job/cloud- init-ci/ 226/rebuild
https:/