[svn] commit: r1860 - in /trunk/src/lib/python/isc/config/tests: ccsession_test.py cfgmgr_test.py
BIND 10 source code commits
bind10-changes at lists.isc.org
Wed May 19 17:02:32 UTC 2010
Author: jelte
Date: Wed May 19 17:02:32 2010
New Revision: 1860
Log:
update the tests too to new commands
Modified:
trunk/src/lib/python/isc/config/tests/ccsession_test.py
trunk/src/lib/python/isc/config/tests/cfgmgr_test.py
Modified: trunk/src/lib/python/isc/config/tests/ccsession_test.py
==============================================================================
--- trunk/src/lib/python/isc/config/tests/ccsession_test.py (original)
+++ trunk/src/lib/python/isc/config/tests/ccsession_test.py Wed May 19 17:02:32 2010
@@ -377,7 +377,7 @@
if name in self.get_answers:
return self.get_answers[name]
else:
- return None
+ return {}
def send_POST(self, name, arg = None):
if name in self.post_answers:
@@ -398,23 +398,20 @@
def create_uccs2(self, fake_conn):
module_spec = isc.config.module_spec_from_file(self.spec_file("spec2.spec"))
- fake_conn.set_get_answer('/config_spec', { module_spec.get_module_name(): module_spec.get_config_spec()})
- fake_conn.set_get_answer('/commands', { module_spec.get_module_name(): module_spec.get_commands_spec()})
+ fake_conn.set_get_answer('/module_spec', { module_spec.get_module_name(): module_spec.get_full_spec()})
fake_conn.set_get_answer('/config_data', { 'version': 1 })
return UIModuleCCSession(fake_conn)
def test_init(self):
fake_conn = fakeUIConn()
- fake_conn.set_get_answer('/config_spec', {})
- fake_conn.set_get_answer('/commands', {})
+ fake_conn.set_get_answer('/module_spec', {})
fake_conn.set_get_answer('/config_data', { 'version': 1 })
uccs = UIModuleCCSession(fake_conn)
self.assertEqual({}, uccs._specifications)
self.assertEqual({ 'version': 1}, uccs._current_config)
module_spec = isc.config.module_spec_from_file(self.spec_file("spec2.spec"))
- fake_conn.set_get_answer('/config_spec', { module_spec.get_module_name(): module_spec.get_config_spec()})
- fake_conn.set_get_answer('/commands', { module_spec.get_module_name(): module_spec.get_commands_spec()})
+ fake_conn.set_get_answer('/module_spec', { module_spec.get_module_name(): module_spec.get_full_spec()})
fake_conn.set_get_answer('/config_data', { 'version': 1 })
uccs = UIModuleCCSession(fake_conn)
self.assertEqual(module_spec._module_spec, uccs._specifications['Spec2']._module_spec)
Modified: trunk/src/lib/python/isc/config/tests/cfgmgr_test.py
==============================================================================
--- trunk/src/lib/python/isc/config/tests/cfgmgr_test.py (original)
+++ trunk/src/lib/python/isc/config/tests/cfgmgr_test.py Wed May 19 17:02:32 2010
@@ -264,7 +264,7 @@
{'result': [0]})
self._handle_msg_helper({ "command": [ "module_spec", { 'foo': 1 } ] },
{'result': [1, 'Error in data definition: no module_name in module_spec']})
- self._handle_msg_helper({ "command": [ "get_module_spec" ] }, { 'result': [ 0, { self.spec.get_module_name(): self.spec.get_config_spec() } ]})
+ self._handle_msg_helper({ "command": [ "get_module_spec" ] }, { 'result': [ 0, { self.spec.get_module_name(): self.spec.get_full_spec() } ]})
self._handle_msg_helper({ "command": [ "get_commands_spec" ] }, { 'result': [ 0, { self.spec.get_module_name(): self.spec.get_commands_spec() } ]})
# re-add this once we have new way to propagate spec changes (1 instead of the current 2 messages)
#self.assertEqual(len(self.fake_session.message_queue), 2)
More information about the bind10-changes
mailing list