コード例 #1
0
 def test_validate_phonenumber_or_raise4(self):
     try:
         validate_phonenumber_or_raise("(716) 543-56556")
     except DataValueError:
         pass
     else:
         self.fail("Expected DataValueError")
コード例 #2
0
 def test_validate_phonenumberor_raise1(self):
     try:
         validate_phonenumber_or_raise("902106")
     except DataValueError:
         pass
     else:
         self.fail("Expected DataValueError")
コード例 #3
0
 def test_validate_phonenumberor_raise2(self):
     try:
         validate_phonenumber_or_raise(90210)
     except TypeError:
         pass
     else:
         self.fail("Expected Typeerror")
コード例 #4
0
 def test_validate_phonenumber_or_raise3(self):
     self.assertEqual(validate_phonenumber_or_raise("(716) 543-5655"), "716-543-5655")
コード例 #5
0
 def test_validate_phonenumber_or_raise0(self):
     self.assertEqual(validate_phonenumber_or_raise("715-345-6434"), "715-345-6434")