Browse Source

[trac698] changed group_unsubscribe
it raises SessionError if the session has been already closed.

Naoki Kambe 14 years ago
parent
commit
4f42307f12
1 changed files with 5 additions and 0 deletions
  1. 5 0
      src/lib/python/isc/config/tests/unittest_fakesession.py

+ 5 - 0
src/lib/python/isc/config/tests/unittest_fakesession.py

@@ -44,6 +44,11 @@ class FakeModuleCCSession:
             self.subscriptions[group_name].append(instance_name)
             
     def group_unsubscribe(self, group_name, instance_name = None):
+
+        # raises SessionError if the session has been already closed.
+        if self._closed:
+            raise isc.cc.SessionError("Session has been closed.")        
+
         if group_name in self.subscriptions:
             if instance_name:
                 if len(self.subscriptions[group_name]) > 1: