def test_valid_ssn(self): party_number = recipients.create_recipient(self.ssn) result = party_number.toxml(element_name="PartyNumber") self.assertEqual(self.expected_ssn, result)
def test_invalid_org_no(self): with self.assertRaises(ValueError): recipients.create_recipient("9105143500")
def test_invalid_ssn(self): with self.assertRaises(ValueError): recipients.create_recipient("01010750165")
def test_invalid(self): with self.assertRaises(ValueError): recipients.create_recipient(None) with self.assertRaises(ValueError): recipients.create_recipient(False)