예제 #1
0
    def test_parse_projects_page(self):
        with open(get_fixture_file("fixtures/html/projects_page.html"), "r") as f:
            s = f.read()
        groups = pages_parser.parse_projects_from_html(s)
        print (groups)

        self.assertEqual(
            [
                ('1', 'liip.ch'),
                ('4', 'www.f-p-sa.ch'),
                ('2', 'giampierobodino.com'),
                ('3', 'https://www.swissaid.ch/')
            ],
            groups
        )
    def test_parse_projects_page(self):
        with open(get_fixture_file("fixtures/html/projects_page.html"), "r") as f:
            s = f.read()
        groups = pages_parser.parse_projects_from_html(s)
        print (groups)

        self.assertEqual(
            [
                ('1', 'liip.ch'),
                ('4', 'www.f-p-sa.ch'),
                ('2', 'giampierobodino.com'),
                ('3', 'https://www.swissaid.ch/')
            ],
            groups
        )
예제 #3
0
 def get_projects(self):
     projects_page = self._awr_cloud_api.get_projects_page()
     return pages_parser.parse_projects_from_html(projects_page.text)
예제 #4
0
 def get_projects(self):
     projects_page = self._awr_cloud_api.get_projects_page()
     return pages_parser.parse_projects_from_html(projects_page.text)