Ejemplo n.º 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")
Ejemplo n.º 2
0
 def test_validate_phonenumberor_raise1(self):
     try:
         validate_phonenumber_or_raise("902106")
     except DataValueError:
         pass
     else:
         self.fail("Expected DataValueError")
Ejemplo n.º 3
0
 def test_validate_phonenumberor_raise2(self):
     try:
         validate_phonenumber_or_raise(90210)
     except TypeError:
         pass
     else:
         self.fail("Expected Typeerror")
Ejemplo n.º 4
0
 def test_validate_phonenumber_or_raise3(self):
     self.assertEqual(validate_phonenumber_or_raise("(716) 543-5655"), "716-543-5655")
Ejemplo n.º 5
0
 def test_validate_phonenumber_or_raise0(self):
     self.assertEqual(validate_phonenumber_or_raise("715-345-6434"), "715-345-6434")