Add a test case 'valid type' to search_params.
Change-Id: Id9a750a6b51590ce5a896432c55c5fb8527e3a54
This commit is contained in:
parent
ddd8761f77
commit
3f5cd82428
@ -36,3 +36,11 @@ class TestSearchController(unittest.TestCase):
|
||||
req = fakes.HTTPRequest.blank('?type=test')
|
||||
res1 = self.controller.search_params(req)
|
||||
self.assertEqual(ret, res1)
|
||||
|
||||
@mock.patch('venus.modules.search.action.SearchCore.params')
|
||||
def test_search_params_valid_type(self, action_params):
|
||||
ret = {'code': 0, 'msg': 'no data, no index'}
|
||||
action_params.return_value = ret
|
||||
req = fakes.HTTPRequest.blank('?type=host_name')
|
||||
res1 = self.controller.search_params(req)
|
||||
self.assertEqual(ret, res1)
|
||||
|
Loading…
x
Reference in New Issue
Block a user