[svn] commit: r3129 - /branches/trac292/src/lib/python/isc/config/tests/ccsession_test.py

BIND 10 source code commits bind10-changes at lists.isc.org
Thu Oct 7 08:38:32 UTC 2010


Author: jelte
Date: Thu Oct  7 08:38:31 2010
New Revision: 3129

Log:
added a test for coverage

Modified:
    branches/trac292/src/lib/python/isc/config/tests/ccsession_test.py

Modified: branches/trac292/src/lib/python/isc/config/tests/ccsession_test.py
==============================================================================
--- branches/trac292/src/lib/python/isc/config/tests/ccsession_test.py (original)
+++ branches/trac292/src/lib/python/isc/config/tests/ccsession_test.py Thu Oct  7 08:38:31 2010
@@ -392,6 +392,25 @@
         self.assertEqual(len(fake_session.message_queue), 1)
         self.assertEqual({'result': [0]},
                          fake_session.get_message('Spec2', None))
+        
+    def test_check_command_without_recvmsg_remote_module(self):
+        "copied from test_check_command3"
+        fake_session = FakeModuleCCSession()
+        mccs = self.create_session("spec1.spec", None, None, fake_session)
+        mccs.set_config_handler(self.my_config_handler_ok)
+        self.assertEqual(len(fake_session.message_queue), 0)
+        cmd = isc.config.ccsession.create_command(isc.config.ccsession.COMMAND_CONFIG_UPDATE, { 'Spec2': { 'item1': 2 }})
+
+        rmodname = mccs.add_remote_config(self.spec_file("spec2.spec"))
+
+        self.assertEqual({'command': ['get_config', {'module_name': 'Spec2'}]},
+                         fake_session.get_message('ConfigManager', None))
+
+        env = { 'group':'Spec2', 'from':None }
+        self.assertEqual(len(fake_session.message_queue), 0)
+        mccs.check_command_without_recvmsg(cmd, env)
+        self.assertEqual(len(fake_session.message_queue), 0)
+        self.assertEqual(mccs.get_remote_config_value('Spec2', 'Spec2/item1'), (2, False))
         
     def test_remote_module(self):
         fake_session = FakeModuleCCSession()




More information about the bind10-changes mailing list