def test_accinf_org_address(self): account_info = Account_Info() address = Address() address.set_line1('Mt. Doom') self.assertEqual(account_info.get_organization_address(), None) account_info.set_organization_address(address) self.assertEqual(account_info.get_organization_address(), address) account_info.clear_organization_address() self.assertEqual(account_info.get_organization_address(), None)
def test_cont_address(self): contact = Contact() address = Address() address.set_state('Oregon') address.set_city('Gravity Falls') address.set_address_type('BUSINESS') self.assertEqual(contact.get_addresses(), None) contact.set_address(address) self.assertEqual( contact.get_address('BUSINESS').get_city(), 'Gravity Falls') contact.remove_address('PERSONAL') self.assertEqual( contact.get_address('BUSINESS').get_city(), 'Gravity Falls') contact.clear_addresses() self.assertEqual(contact.get_address('BUSINESS'), None)
def test_cont_address(self): contact = Contact() address = Address() address.set_state("Oregon") address.set_city("Gravity Falls") address.set_address_type("BUSINESS") self.assertEqual(contact.get_addresses(), None) contact.set_address(address) self.assertEqual(contact.get_address("BUSINESS").get_city(), "Gravity Falls") contact.remove_address("PERSONAL") self.assertEqual(contact.get_address("BUSINESS").get_city(), "Gravity Falls") contact.clear_addresses() self.assertEqual(contact.get_address("BUSINESS"), None)