class RecordedDocumentParticipantDeserializerTest(unittest.TestCase): def setUp(self): super(RecordedDocumentParticipantDeserializerTest, self).setUp() self.subject = RecordedDocumentParticipantDeserializer() def test_deserialize_participants_1(self): participants_html_file = open(os.path.join(DIRECTORY_PATH, 'fixtures/participants_1.html')) participants_html = participants_html_file.read() participants_html_file.close() kevin = Participant(name='MOLINARI KEVIN', role='GRANTOR') bank = Participant(name='FIRST REPUBLIC BANK', role='GRANTEE') expected_participants = [kevin, bank] participants = self.subject.deserialize(participants_html) participant_lists_should_be_equal(participants, expected_participants, self) def test_deserialize_participants_2(self): participants_html_file = open(os.path.join(DIRECTORY_PATH, 'fixtures/participants_2.html')) participants_html = participants_html_file.read() participants_html_file.close() isabell = Participant(name='PORTER ISABELL J', role='GRANTOR') trust = Participant(name='FONG 1987 REVOC TRUST', role='GRANTEE') gary = Participant(name='FONG ALLEN GARY', role='GRANTEE') gladys = Participant(name='FONG GLADYS J', role='GRANTEE') expected_participants = [isabell, trust, gary, gladys] participants = self.subject.deserialize(participants_html) participant_lists_should_be_equal(participants, expected_participants, self) def test_deserialize_participants_3(self): participants_html_file = open(os.path.join(DIRECTORY_PATH, 'fixtures/participants_3.html')) participants_html = participants_html_file.read() participants_html_file.close() gloria = Participant(name='TONG GLORIA C', role='GRANTOR') expected_participants = [gloria] participants = self.subject.deserialize(participants_html) participant_lists_should_be_equal(participants, expected_participants, self)
def setUp(self): super(RecordedDocumentParticipantDeserializerTest, self).setUp() self.subject = RecordedDocumentParticipantDeserializer()