summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYun Huang <yun.huang@windriver.com>2018-03-27 16:02:46 +0800
committerYun Huang <yun.huang@windriver.com>2018-03-27 16:02:46 +0800
commit6df44251c333a0ae9df439e234542e676b4470d5 (patch)
treeaeba8aabcd938651e44f05dcf197a3a55c95d92e
parentfa556ed92ed8952f9a966677f031d2573ab16a49 (diff)
Fix UT bug in test-image
Change-Id: Ic2175e0bd87ee56d1a0457b69090ec0098c51c76 Issue-ID: MULTICLOUD-203 Signed-off-by: Yun Huang <yun.huang@windriver.com>
-rw-r--r--newton/newton/requests/tests/test_image.py4
1 files changed, 3 insertions, 1 deletions
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()