Setting up charm_dir() return_value on mocked hookenv
tox -e py36 fails before running any unit test for Designate-Bind Charm TypeError happens during test discover time, where mocked hookenv.charm_dir() is called without any return_value defined Change-Id: Ic0454109e5353e5379e26b3d166431e259d738f0 Partial-Bug: #1783765
This commit is contained in:
parent
454f88ee25
commit
c7a61c43e2
|
@ -41,6 +41,9 @@ def mock_charmhelpers():
|
|||
charmhelpers.contrib.hahelpers)
|
||||
sys.modules['charmhelpers.contrib.hahelpers.cluster'] = (
|
||||
charmhelpers.contrib.hahelpers.cluster)
|
||||
sys.modules['charmhelpers.core.hookenv.charm_dir'] = (
|
||||
charmhelpers.core.hookenv.charm_dir)
|
||||
charmhelpers.core.hookenv.charm_dir.return_value = "/tmp"
|
||||
|
||||
# mock in the openstack releases so that the tests can run
|
||||
charmhelpers.contrib.openstack.utils.OPENSTACK_RELEASES = (
|
||||
|
|
Loading…
Reference in New Issue