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)
def setUp(self): self.notifier = Notifier() self.notifier.multitonKey = "key"