예제 #1
0
 def test_validate_zipcodeor_raise1(self):
     try:
         validate_zipcode_or_raise("902106")
     except DataValueError:
         pass
     else:
         self.fail("Expected DataValueError")
예제 #2
0
 def test_validate_zipcodeor_raise2(self):
     try:
         validate_zipcode_or_raise(90210)
     except TypeError:
         pass
     else:
         self.fail("Expected Typeerror")
예제 #3
0
 def test_validate_zipcode_or_raise0(self):
     self.assertEqual(validate_zipcode_or_raise("90210"), "90210")