import unittest
from Observers import Observer, ObserverMailServer, ObserverPbx
from Subjects import Subject, SubjectEflow


class UtVisitor(unittest.TestCase):

    def test_observer(self):

        # Create observers
        pbx = ObserverPbx()
        ms = ObserverMailServer()
            
        # Create subject
        subject = SubjectEflow()
        subject.attach(pbx)
        subject.attach(ms)

        # Notify when JB is leave of absence
        subject.notify("JB", "Hachi")
            
        self.assertTrue(True)


if __name__ == '__main__':
    unittest.main()

[(26, 'unittest.main', 'unittest.main', False, 'import unittest\n'), (11, 'Observers.ObserverPbx', 'ObserverPbx', False, 'from Observers import Observer, ObserverMailServer, ObserverPbx\n'), (12, 'Observers.ObserverMailServer', 'ObserverMailServer', False, 'from Observers import Observer, ObserverMailServer, ObserverPbx\n'), (15, 'Subjects.SubjectEflow', 'SubjectEflow', False, 'from Subjects import Subject, SubjectEflow\n')]