Example #1
0
class NotifierTest(unittest.TestCase):
    """ObserverTest: Test Observer Pattern"""
    def setUp(self):
        self.notifier = Notifier()
        self.notifier.multitonKey = "key"

    def testSendNotificationNoBodyAndType(self):
        """NotifierTest: send notification without body and type"""
        try:
            self.notifier.sendNotification("TestNotification")
        except Exception, e:  # Old-style 'except' for Python 2.5 compatibility
            self.fail(e)
class NotifierTest(unittest.TestCase):
    """ObserverTest: Test Observer Pattern"""

    def setUp(self):
        self.notifier = Notifier()
        self.notifier.multitonKey = "key"

    def testSendNotificationNoBodyAndType(self):
        """NotifierTest: send notification without body and type"""
        try:
            self.notifier.sendNotification("TestNotification")
        except Exception, e:  # Old-style 'except' for Python 2.5 compatibility
            self.fail(e)
Example #3
0
 def setUp(self):
     self.notifier = Notifier()
     self.notifier.multitonKey = "key"
 def setUp(self):
     self.notifier = Notifier()
     self.notifier.multitonKey = "key"