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, 4, 26, 19), 'unittest.main', 'unittest.main', ({}, {}), '()', False, 'import unittest\n'), ((11, 14, 11, 27), 'Observers.ObserverPbx', 'ObserverPbx', ({}, {}), '()', False, 'from Observers import Observer, ObserverMailServer, ObserverPbx\n'), ((12, 13, 12, 33), 'Observers.ObserverMailServer', 'ObserverMailServer', ({}, {}), '()', False, 'from Observers import Observer, ObserverMailServer, ObserverPbx\n'), ((15, 18, 15, 32), 'Subjects.SubjectEflow', 'SubjectEflow', ({}, {}), '()', False, 'from Subjects import Subject, SubjectEflow\n')]