]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2930] Test empty params in python
authorMichal 'vorner' Vaner <vorner@vorner.cz>
Wed, 22 May 2013 10:33:21 +0000 (12:33 +0200)
committerMichal 'vorner' Vaner <vorner@vorner.cz>
Wed, 22 May 2013 10:33:21 +0000 (12:33 +0200)
src/lib/python/isc/config/tests/ccsession_test.py

index f7d014d6e9631e536b443f52a2ada1e27b3d524a..3585337a1f3a4f8ff74aeb440c2aa527021ded7d 100644 (file)
@@ -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)