From 6df44251c333a0ae9df439e234542e676b4470d5 Mon Sep 17 00:00:00 2001 From: Yun Huang Date: Tue, 27 Mar 2018 16:02:46 +0800 Subject: Fix UT bug in test-image Change-Id: Ic2175e0bd87ee56d1a0457b69090ec0098c51c76 Issue-ID: MULTICLOUD-203 Signed-off-by: Yun Huang --- newton/newton/requests/tests/test_image.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/newton/newton/requests/tests/test_image.py b/newton/newton/requests/tests/test_image.py index fff04e89..c32ccd50 100644 --- a/newton/newton/requests/tests/test_image.py +++ b/newton/newton/requests/tests/test_image.py @@ -14,6 +14,7 @@ import mock import unittest +import json from six.moves import urllib from rest_framework import status @@ -93,7 +94,8 @@ class TestImageNewton(unittest.TestCase, AbstractTestResource): "/api/%s/v0/windriver-hudson-dc_RegionOne/" "fcca3cc49d5e42caae15459e27103efc/" "images" % test_base.MULTIVIM_VERSION, - self.MOCK_POST_RESOURCE_REQUEST, + data=json.dumps(self.MOCK_POST_RESOURCE_REQUEST), + content_type='application/json', HTTP_X_AUTH_TOKEN=mock_info.MOCK_TOKEN_ID) context = response.json() -- cgit 1.2.3-korg