Esempio 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
Esempio 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
Esempio 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
Esempio 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
Esempio 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
Esempio 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
Esempio 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
Esempio 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
Esempio 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")
Esempio 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")