Exemplo n.º 1
0
 def test_find_phone_with_spaces_and_dashes2(self):
     line = "SMS from (585) 370-7180 "
     try:
         thing = tools.find_phone_number(line)
     except NoNumError as error:
         self.fail(" (504) 908-0034 should have parsed as an accceptable number.")
         pass
Exemplo n.º 2
0
    def test_find_phone_with_dash(self):
        line = "Some phone number: -(504) 908-0034 "
        try:
            thing = tools.find_phone_number(line)
            self.fail("-(504) 908-0034 shouldn't have parsed as a phone number.")
        except NoNumError as error:

            pass
Exemplo n.º 3
0
 def test_find_phone_with_incomplete_entry(self):
     line = "Some phone number: 04-908-0034 "
     try:
         thing = tools.find_phone_number(line)
         self.fail("04-908-0034 shouldn't have parsed as a phone number.")
     except NoNumError as error:
         ##Woo! it worked.
         pass
Exemplo n.º 4
0
 def test_find_phone_with_spaces_and_dashes2(self):
     line = "SMS from (585) 370-7180 "
     try:
         thing = tools.find_phone_number(line)
     except NoNumError as error:
         self.fail(
             " (504) 908-0034 should have parsed as an accceptable number.")
         pass
Exemplo n.º 5
0
 def test_find_phone_with_incomplete_entry(self):
     line = "Some phone number: 04-908-0034 "
     try:
         thing = tools.find_phone_number(line)
         self.fail("04-908-0034 shouldn't have parsed as a phone number.")
     except NoNumError as error:
         ##Woo! it worked.
         pass
Exemplo n.º 6
0
    def test_find_phone_with_dash(self):
        line = "Some phone number: -(504) 908-0034 "
        try:
            thing = tools.find_phone_number(line)
            self.fail(
                "-(504) 908-0034 shouldn't have parsed as a phone number.")
        except NoNumError as error:

            pass
Exemplo n.º 7
0
    def test_find_phone_with_country_code3(self):
        """

        """
        line = "Some phone number: 3223-504-908-0034 "
        try:
            thing = tools.find_phone_number(line)
            self.fail(" 3223-504-908-0034 shouldn't have parsed as a phone number.")
        except NoNumError as error:

            pass
Exemplo n.º 8
0
    def test_find_phone_with_country_code3(self):
        """

        """
        line = "Some phone number: 3223-504-908-0034 "
        try:
            thing = tools.find_phone_number(line)
            self.fail(
                " 3223-504-908-0034 shouldn't have parsed as a phone number.")
        except NoNumError as error:

            pass
Exemplo n.º 9
0
 def test_find_phone_no_country_code(self):
     line = "Some phone number: (504) 908-0034 "
     self.assertEquals(tools.find_phone_number(line), "(504) 908-0034")
Exemplo n.º 10
0
 def test_find_phone_no_country_code(self):
     line = "Some phone number: (504) 908-0034 "
     self.assertEquals(tools.find_phone_number(line), "(504) 908-0034")