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

add tests from #468


git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@4124 e5f2f494-b856-4b98-b285-d166d9295462
parent 625080ef
......@@ -109,6 +109,9 @@ class TestModuleSpec(unittest.TestCase):
return dd.validate_command(cmd_name, params)
def test_command_validation(self):
# tests for a command that doesn't take an argument
self.assertEqual(True, self.read_spec_file("spec2.spec").validate_command("shutdown", None));
self.assertEqual(False, self.read_spec_file("spec2.spec").validate_command("shutdown", '{"val": 1}'));
self.assertEqual(True, self.validate_command_params("spec27.spec", "data22_1.data", 'cmd1'))
self.assertEqual(False, self.validate_command_params("spec27.spec", "data22_2.data",'cmd1'))
self.assertEqual(False, self.validate_command_params("spec27.spec", "data22_3.data", 'cmd1'))
......
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