diff --git a/hot/software-config/elements/heat-config/bin/heat-config-notify b/hot/software-config/elements/heat-config/bin/heat-config-notify index 2954860..eba1258 100755 --- a/hot/software-config/elements/heat-config/bin/heat-config-notify +++ b/hot/software-config/elements/heat-config/bin/heat-config-notify @@ -107,10 +107,10 @@ def main(argv=sys.argv, stdin=sys.stdin): str_signal_data = trim_response(signal_data) if sigverb == 'PUT': r = requests.put(sigurl, data=str_signal_data, - headers={'content-type': None}) + headers={'content-type': 'application/json'}) else: r = requests.post(sigurl, data=str_signal_data, - headers={'content-type': None}) + headers={'content-type': 'application/json'}) log.debug('Response %s ' % r) if 'deploy_queue_id' in iv: diff --git a/tests/software_config/test_heat_config_notify.py b/tests/software_config/test_heat_config_notify.py index 5aea988..c3d5d20 100644 --- a/tests/software_config/test_heat_config_notify.py +++ b/tests/software_config/test_heat_config_notify.py @@ -118,7 +118,7 @@ class HeatConfigNotifyTest(common.RunScriptTest): requests.post.assert_called_once_with( 'mock://192.0.2.3/foo', data=signal_data, - headers={'content-type': None}) + headers={'content-type': 'application/json'}) def test_notify_signal_id_put(self): requests = mock.MagicMock() @@ -136,7 +136,7 @@ class HeatConfigNotifyTest(common.RunScriptTest): requests.put.assert_called_once_with( 'mock://192.0.2.3/foo', data=signal_data, - headers={'content-type': None}) + headers={'content-type': 'application/json'}) def test_notify_signal_id_empty_data(self): requests = mock.MagicMock() @@ -153,7 +153,7 @@ class HeatConfigNotifyTest(common.RunScriptTest): requests.post.assert_called_once_with( 'mock://192.0.2.3/foo', data='{}', - headers={'content-type': None}) + headers={'content-type': 'application/json'}) def test_notify_signal_id_invalid_json_data(self): requests = mock.MagicMock() @@ -170,7 +170,7 @@ class HeatConfigNotifyTest(common.RunScriptTest): requests.post.assert_called_once_with( 'mock://192.0.2.3/foo', data='{}', - headers={'content-type': None}) + headers={'content-type': 'application/json'}) def test_notify_heat_signal(self): ksclient = mock.MagicMock()