예제 #1
0
    def test_real(self):
        simple_from_pdf = "POST OFFICE BOX 3 18  61 BROADWAY  SARANAC LAKE, NEW YORK  12983-031 8 PHONE: 518-891 -2600  FAX: 51 8-891-2756 Sept. 22, 2005 r; Bureau of  Customs and Border  Protection Office of Regulations  and  Rulings Regulations Branch 1300 Pennsylvania  Ave., NW Washington, D.C. 20229 Re: Federal  rule  proposal,  Regulatory Information Number  165 1 -AA66 To whom it may concern: Please  consider  the  enclosed-editorial column as the official  comment  from the editorial board  of  our  two  newspapers - the Adirondack Daily Enterprise and the Lake Placid News  - on the passport  reqirement  rule proposed by  the U.S. departments of State and Homeland Security. Sincerely, Peter Crowley Managing editor Adirondack Daily Cc:  Plattsburgh-North  Country  Chamber of  Commerce P.O. Box  3 10 Plattsburgh, NY  1290 1"
        self.assertEqual(simple_from_pdf, extract_comment(simple_from_pdf))

        complex_from_pdf = "'II-Cl-05  PO1:33  IN Public  Comment  for  Document  Requirement  for Travel  Within  the  Western  Hemisphere Agency:  State Department Docket  ID:  165 1 -AA66 Author:  Judith  Quarles Email:  [email protected] Organization: Mailing  Address:  10 Park  St.  Oneonta  NY,  13820 Comments:  I  believe  the  requirement  for  a passport  as the  only  form  of  ID  would delay  travellers  unduly.  It  would  also  require  the  passport  office  to  come  up  with  a huge  number  of  passports  in  a short  period  of  time. When  I  was  growing  up  we  were  taught  how  wonderful  it  was  that  our  border  with Canada  was  so  open  and  friendly  and  did  not  require  passports.  I  hate  to  see that change.  Is  it  really  necessary  to  require  passports?"
        comment_from_pdf = "I  believe  the  requirement  for  a passport  as the  only  form  of  ID  would delay  travellers  unduly.  It  would  also  require  the  passport  office  to  come  up  with  a huge  number  of  passports  in  a short  period  of  time. When  I  was  growing  up  we  were  taught  how  wonderful  it  was  that  our  border  with Canada  was  so  open  and  friendly  and  did  not  require  passports.  I  hate  to  see that change.  Is  it  really  necessary  to  require  passports?"
        self.assertEqual(comment_from_pdf, extract_comment(complex_from_pdf))

        complex_from_crtext = "****** PUBLIC SUBMISSION ****** As of:4/4/11 11:02 AM                                Comments Due:October 31, 2005Docket:USCBP-2005-0005Documents Required for Travel Within the Western HemisphereComment On:USCBP-2005-0005-0001Documents Required for Travel Within the Western HemisphereDocument:USCBP-2005-0005-0128Comment submitted by Terri L. Land, Michigan Department of State===============================================================================***** Submitter Information *****===============================================================================***** General Comment *****The Michigan Department of State proposes that the Department of HomelandSecurity and Secretary of State accept a state-issued driver?s license oridentification card that is compliant with the REAL ID Act as an acceptabledocument under section 7209 of the Intelligence Reform and Terrorist PreventionAct of 2004, also known as the Western Hemisphere Travel Initiative.===============================================================================***** Attachments *****USCBP-2005-0005-0128.1 Comment submitted by Terry Lynn Land, Secretary of                       State, State of Michigan"
        comment_from_crtext = "The Michigan Department of State proposes that the Department of HomelandSecurity and Secretary of State accept a state-issued driver?s license oridentification card that is compliant with the REAL ID Act as an acceptabledocument under section 7209 of the Intelligence Reform and Terrorist PreventionAct of 2004, also known as the Western Hemisphere Travel Initiative."
        self.assertEqual(comment_from_crtext, extract_comment(complex_from_crtext))

        complex_from_msw = "Title: Documents Required for Travel Within the Western HemisphereFR Document Number: 05-17533Legacy Document ID:RIN:Publish Date: 09/01/2005 00:00:00Submitter Info:First Name: DeborahLast Name: HengstMailing Address: 345 Third Street #605City: Niagara FallsCountry: United StatesState or Province: NYPostal Code: 14303Email Address: [email protected] Name: Niagara Tourism & Convention CorporationComment Info: =================General Comment:I work for the Niagara Tourism & Convention Corporation,which is the agency responsible for the promotion of all of the NiagaraCounty region.  As a tourism employee and Niagara Falls resident, I feelthat this initiative would not be in the best interest of the localeconomy.  Tourism is one of the largest factors in this area's economy andby instituting mandatory passports, I really feel that the economy wouldsuffer by lagging tourism.  As a Niagara Falls resident who often timesenjoys traveling to Canada for baseball games, I can tell you that myfamily would not purchase passports at $100+ each just to go to a baseballgame.  Therefore, I can see where the economy in Canada would also sufferfrom this initiative as I'm sure mine wouldn't be the only family to stopgoing.I urge the federal government to reconsider this initiative and to listento our local leaders who are pushing for other alternatives to the passportmandate."
        comment_from_msw = "I work for the Niagara Tourism & Convention Corporation,which is the agency responsible for the promotion of all of the NiagaraCounty region.  As a tourism employee and Niagara Falls resident, I feelthat this initiative would not be in the best interest of the localeconomy.  Tourism is one of the largest factors in this area's economy andby instituting mandatory passports, I really feel that the economy wouldsuffer by lagging tourism.  As a Niagara Falls resident who often timesenjoys traveling to Canada for baseball games, I can tell you that myfamily would not purchase passports at $100+ each just to go to a baseballgame.  Therefore, I can see where the economy in Canada would also sufferfrom this initiative as I'm sure mine wouldn't be the only family to stopgoing.I urge the federal government to reconsider this initiative and to listento our local leaders who are pushing for other alternatives to the passportmandate."
        self.assertEqual(comment_from_msw, extract_comment(complex_from_msw))
예제 #2
0
    def test_real(self):
        simple_from_pdf = 'POST OFFICE BOX 3 18  61 BROADWAY  SARANAC LAKE, NEW YORK  12983-031 8 PHONE: 518-891 -2600  FAX: 51 8-891-2756 Sept. 22, 2005 r; Bureau of  Customs and Border  Protection Office of Regulations  and  Rulings Regulations Branch 1300 Pennsylvania  Ave., NW Washington, D.C. 20229 Re: Federal  rule  proposal,  Regulatory Information Number  165 1 -AA66 To whom it may concern: Please  consider  the  enclosed-editorial column as the official  comment  from the editorial board  of  our  two  newspapers - the Adirondack Daily Enterprise and the Lake Placid News  - on the passport  reqirement  rule proposed by  the U.S. departments of State and Homeland Security. Sincerely, Peter Crowley Managing editor Adirondack Daily Cc:  Plattsburgh-North  Country  Chamber of  Commerce P.O. Box  3 10 Plattsburgh, NY  1290 1'
        self.assertEqual(simple_from_pdf, extract_comment(simple_from_pdf))

        complex_from_pdf = "'II-Cl-05  PO1:33  IN Public  Comment  for  Document  Requirement  for Travel  Within  the  Western  Hemisphere Agency:  State Department Docket  ID:  165 1 -AA66 Author:  Judith  Quarles Email:  [email protected] Organization: Mailing  Address:  10 Park  St.  Oneonta  NY,  13820 Comments:  I  believe  the  requirement  for  a passport  as the  only  form  of  ID  would delay  travellers  unduly.  It  would  also  require  the  passport  office  to  come  up  with  a huge  number  of  passports  in  a short  period  of  time. When  I  was  growing  up  we  were  taught  how  wonderful  it  was  that  our  border  with Canada  was  so  open  and  friendly  and  did  not  require  passports.  I  hate  to  see that change.  Is  it  really  necessary  to  require  passports?"
        comment_from_pdf = "I  believe  the  requirement  for  a passport  as the  only  form  of  ID  would delay  travellers  unduly.  It  would  also  require  the  passport  office  to  come  up  with  a huge  number  of  passports  in  a short  period  of  time. When  I  was  growing  up  we  were  taught  how  wonderful  it  was  that  our  border  with Canada  was  so  open  and  friendly  and  did  not  require  passports.  I  hate  to  see that change.  Is  it  really  necessary  to  require  passports?"
        self.assertEqual(comment_from_pdf, extract_comment(complex_from_pdf))

        complex_from_crtext = '****** PUBLIC SUBMISSION ****** As of:4/4/11 11:02 AM                                Comments Due:October 31, 2005Docket:USCBP-2005-0005Documents Required for Travel Within the Western HemisphereComment On:USCBP-2005-0005-0001Documents Required for Travel Within the Western HemisphereDocument:USCBP-2005-0005-0128Comment submitted by Terri L. Land, Michigan Department of State===============================================================================***** Submitter Information *****===============================================================================***** General Comment *****The Michigan Department of State proposes that the Department of HomelandSecurity and Secretary of State accept a state-issued driver?s license oridentification card that is compliant with the REAL ID Act as an acceptabledocument under section 7209 of the Intelligence Reform and Terrorist PreventionAct of 2004, also known as the Western Hemisphere Travel Initiative.===============================================================================***** Attachments *****USCBP-2005-0005-0128.1 Comment submitted by Terry Lynn Land, Secretary of                       State, State of Michigan'
        comment_from_crtext = 'The Michigan Department of State proposes that the Department of HomelandSecurity and Secretary of State accept a state-issued driver?s license oridentification card that is compliant with the REAL ID Act as an acceptabledocument under section 7209 of the Intelligence Reform and Terrorist PreventionAct of 2004, also known as the Western Hemisphere Travel Initiative.'
        self.assertEqual(comment_from_crtext,
                         extract_comment(complex_from_crtext))

        complex_from_msw = "Title: Documents Required for Travel Within the Western HemisphereFR Document Number: 05-17533Legacy Document ID:RIN:Publish Date: 09/01/2005 00:00:00Submitter Info:First Name: DeborahLast Name: HengstMailing Address: 345 Third Street #605City: Niagara FallsCountry: United StatesState or Province: NYPostal Code: 14303Email Address: [email protected] Name: Niagara Tourism & Convention CorporationComment Info: =================General Comment:I work for the Niagara Tourism & Convention Corporation,which is the agency responsible for the promotion of all of the NiagaraCounty region.  As a tourism employee and Niagara Falls resident, I feelthat this initiative would not be in the best interest of the localeconomy.  Tourism is one of the largest factors in this area's economy andby instituting mandatory passports, I really feel that the economy wouldsuffer by lagging tourism.  As a Niagara Falls resident who often timesenjoys traveling to Canada for baseball games, I can tell you that myfamily would not purchase passports at $100+ each just to go to a baseballgame.  Therefore, I can see where the economy in Canada would also sufferfrom this initiative as I'm sure mine wouldn't be the only family to stopgoing.I urge the federal government to reconsider this initiative and to listento our local leaders who are pushing for other alternatives to the passportmandate."
        comment_from_msw = "I work for the Niagara Tourism & Convention Corporation,which is the agency responsible for the promotion of all of the NiagaraCounty region.  As a tourism employee and Niagara Falls resident, I feelthat this initiative would not be in the best interest of the localeconomy.  Tourism is one of the largest factors in this area's economy andby instituting mandatory passports, I really feel that the economy wouldsuffer by lagging tourism.  As a Niagara Falls resident who often timesenjoys traveling to Canada for baseball games, I can tell you that myfamily would not purchase passports at $100+ each just to go to a baseballgame.  Therefore, I can see where the economy in Canada would also sufferfrom this initiative as I'm sure mine wouldn't be the only family to stopgoing.I urge the federal government to reconsider this initiative and to listento our local leaders who are pushing for other alternatives to the passportmandate."
        self.assertEqual(comment_from_msw, extract_comment(complex_from_msw))
예제 #3
0
    def test_simple(self):
        self.assertEqual("", extract_comment(""))
        self.assertEqual("no marker", extract_comment("no marker"))
        self.assertEqual("no marker\nnewline", extract_comment("no marker\nnewline"))

        self.assertEqual("simple content", extract_comment("first metadata... Comment: simple content"))
        self.assertEqual("newline\ncontent", extract_comment("first metadata... Comment:\nnewline\ncontent\n"))

        self.assertEqual("star marker", extract_comment("Comment ****** star marker"))

        self.assertEqual("middle section", extract_comment("*** General Comment *** middle section ==== Attachments"))
예제 #4
0
    def test_simple(self):
        self.assertEqual('', extract_comment(''))
        self.assertEqual('no marker', extract_comment('no marker'))
        self.assertEqual('no marker\nnewline',
                         extract_comment('no marker\nnewline'))

        self.assertEqual(
            'simple content',
            extract_comment('first metadata... Comment: simple content'))
        self.assertEqual(
            'newline\ncontent',
            extract_comment('first metadata... Comment:\nnewline\ncontent\n'))

        self.assertEqual('star marker',
                         extract_comment('Comment ****** star marker'))

        self.assertEqual(
            'middle section',
            extract_comment(
                '*** General Comment *** middle section ==== Attachments'))