def test_020_address_validation_false(self): "Test the address validation of wrong address" address_validation_type = AddressValidation.request_type( CountryCode="US", City="MIAMI", StateProvinceCode="FL", PostalCode="12345" ) response = self.address_validation.request(address_validation_type) self.assertTrue( len(response.AddressValidationResult) > 1 ) print etree.tostring(response, pretty_print=True)
def test_010_address_validation_true(self): "Test the address validation of correct address" address_validation_type = AddressValidation.request_type( CountryCode="US", City="MIAMI", StateProvinceCode="FL", PostalCode="33101" ) response = self.address_validation.request(address_validation_type) self.assertEqual( response.AddressValidationResult.Quality, 1.0 ) print etree.tostring(response, pretty_print=True)