diff --git a/.gitignore b/.gitignore index a68c28d..98c9c5a 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ interfaces trusty .testrepository __pycache__ +.stestr diff --git a/src/layer.yaml b/src/layer.yaml index ed5e90e..cb07dcb 100644 --- a/src/layer.yaml +++ b/src/layer.yaml @@ -1,3 +1,6 @@ includes: ['layer:openstack', 'interface:barbican-hsm'] repo: https://github.com/openstack/charm-barbican-softhsm - +options: + basic: + use_venv: true + include_system_packages: true diff --git a/unit_tests/test_lib_barbican_softhsm.py b/unit_tests/test_lib_barbican_softhsm.py index 404b3ba..f4f4d43 100644 --- a/unit_tests/test_lib_barbican_softhsm.py +++ b/unit_tests/test_lib_barbican_softhsm.py @@ -47,8 +47,8 @@ class TestSoftHSM(test_utils.PatchHelper): # test with no file (patch open so that it raises an error) mock_open = mock.MagicMock(return_value=mock.sentinel.file_handle) with mock.patch('builtins.open', mock_open): - def raise_exception(): - raise Exception("Supposed to break") + def raise_exception(*args): + raise OSError("Supposed to break") mock_open.side_effect = raise_exception pin, so_pin = softhsm.read_pins_from_store() self.assertEqual(pin, None)