Browse Source

[2930] Test empty params in python

Michal 'vorner' Vaner 12 years ago
parent
commit
fafa0dd4a0
1 changed files with 14 additions and 0 deletions
  1. 14 0
      src/lib/python/isc/config/tests/ccsession_test.py

+ 14 - 0
src/lib/python/isc/config/tests/ccsession_test.py

@@ -362,6 +362,20 @@ class TestModuleCCSession(unittest.TestCase):
                 "param": True
             }]}, False]], fake_session.message_queue)
 
+    def test_notify_no_params(self):
+        """
+        Test the sent notification has the right format, this time
+        without passing parameters.
+        """
+        fake_session = FakeModuleCCSession()
+        mccs = self.create_session("spec1.spec", None, None, fake_session)
+        mccs.notify("group", "event")
+        self.assertEqual([
+                ["notifications/group", "*", {"notification": ["event"]},
+                 False]
+            ],
+            fake_session.message_queue)
+
     def my_config_handler_ok(self, new_config):
         return isc.config.ccsession.create_answer(0)