Commit c150ac07 authored by Jelte Jansen's avatar Jelte Jansen
Browse files

fixed the failing tests for cmdctl


git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1868 e5f2f494-b856-4b98-b285-d166d9295462
parent 8d84331a
......@@ -51,9 +51,8 @@ class MySecureHTTPServer(SecureHTTPServer):
class MyCommandControl(CommandControl):
def __init__(self):
self.command_spec = {}
self.config_spec = {}
self.config_data = {}
self.module_spec = {}
def send_command(self, mod, cmd, param):
return 0, {}
......@@ -120,7 +119,7 @@ class TestSecureHTTPRequestHandler(unittest.TestCase):
def test_do_GET_3(self):
self.handler.headers['cookie'] = 12346
self.handler.server.user_sessions[12346] = time.time() + 1000000
path_vec = ['command_spec', 'config_data', 'config_spec']
path_vec = ['config_data', 'module_spec']
for path in path_vec:
self.handler.path = '/' + path
self.handler.do_GET()
......@@ -245,8 +244,8 @@ class TestSecureHTTPRequestHandler(unittest.TestCase):
os.remove('check.tmp')
self.handler.path = '/module/command'
self.handler.server.cmdctrl.command_spec = {}
self.handler.server.cmdctrl.command_spec['module'] = [{'command_name':'command'}, {'command_name': ['data1']} ]
self.handler.server.cmdctrl.module_spec = {}
self.handler.server.cmdctrl.module_spec['module'] = { 'commands': [{'command_name':'command'}, {'command_name': ['data1']} ] }
rcode, reply = self.handler._handle_post_request()
self.assertEqual(http.client.OK, rcode)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment