Add the missing t

This commit is contained in:
Liam Young
2018-04-18 08:57:38 +00:00
parent 2e522f2ab4
commit 56b0f556a6
2 changed files with 6 additions and 6 deletions

View File

@@ -30,20 +30,20 @@ class TestCharmLifecycleDeploy(ut_utils.BaseTestCase):
{'OS_VIP04': '10.10.0.2'}
)
def test_get_charm_config_contex(self):
def test_get_charm_config_context(self):
self.patch_object(lc_deploy.utils, 'get_charm_config')
self.get_charm_config.return_value = {
'charm_name': 'mycharm'}
self.assertEqual(
lc_deploy.get_charm_config_contex(),
lc_deploy.get_charm_config_context(),
{'charm_location': '../../../mycharm', 'charm_name': 'mycharm'})
def test_get_template_overlay_context(self):
self.patch_object(lc_deploy, 'get_template_context_from_env')
self.patch_object(lc_deploy, 'get_charm_config_contex')
self.patch_object(lc_deploy, 'get_charm_config_context')
self.get_template_context_from_env.return_value = {
'OS_VIP04': '10.10.0.2'}
self.get_charm_config_contex.return_value = {
self.get_charm_config_context.return_value = {
'charm_location': '../../../mycharm',
'charm_name': 'mycharm'}
self.assertEqual(

View File

@@ -52,7 +52,7 @@ def get_template_context_from_env():
return {k: v for k, v in os.environ.items() if is_valid_env_key(k)}
def get_charm_config_contex():
def get_charm_config_context():
"""Return settings from charm config file
:returns: Context for template rendering
@@ -74,7 +74,7 @@ def get_template_overlay_context():
context = {}
contexts = [
get_template_context_from_env(),
get_charm_config_contex()]
get_charm_config_context()]
for c in contexts:
context.update(c)
return context