summaryrefslogtreecommitdiffstats
path: root/newton
diff options
context:
space:
mode:
authorYun Huang <yun.huang@windriver.com>2018-03-27 15:55:43 +0800
committerYun Huang <yun.huang@windriver.com>2018-03-27 15:55:43 +0800
commitfa556ed92ed8952f9a966677f031d2573ab16a49 (patch)
treead3aa5cac1bbad752087ea547d36277b3b74c041 /newton
parentc0a0311e9442922365c1122aaa4e85b4fcf4420f (diff)
Fix UT bug in test-flavor
Change-Id: I9e92cc4d1f3b2704dcf77b5e49f7bc13d4ba969f Issue-ID: MULTICLOUD-203 Signed-off-by: Yun Huang <yun.huang@windriver.com>
Diffstat (limited to 'newton')
-rw-r--r--newton/newton/requests/tests/test_flavor.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/newton/newton/requests/tests/test_flavor.py b/newton/newton/requests/tests/test_flavor.py
index e0fa041a..4a9df9c5 100644
--- a/newton/newton/requests/tests/test_flavor.py
+++ b/newton/newton/requests/tests/test_flavor.py
@@ -12,6 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+import json
import mock
import unittest
@@ -184,7 +185,8 @@ class TestFlavorsNewton(unittest.TestCase, AbstractTestResource):
("/api/%s/v0/windriver-hudson-dc_RegionOne"
"/fcca3cc49d5e42caae15459e27103efc/"
"flavors" % 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()
@@ -220,7 +222,8 @@ class TestFlavorsNewton(unittest.TestCase, AbstractTestResource):
("/api/%s/v0/windriver-hudson-dc_RegionOne/"
"fcca3cc49d5e42caae15459e27103efc/"
"flavors" % test_base.MULTIVIM_VERSION),
- self.MOCK_POST_RESOURCE_REQUEST_EXISTING,
+ data=json.dumps(self.MOCK_POST_RESOURCE_REQUEST_EXISTING),
+ content_type='application/json',
HTTP_X_AUTH_TOKEN=mock_info.MOCK_TOKEN_ID)
context = response.json()