Exemple #1
0
    def scrape(self, filename, extra_args=None):
        # Create a set of valid arguments to run the app.
        abs_filename = path.join(test_utils.find_repository_root(__file__),
                                 'examples', filename)

        argparser = version.ArgumentParser()
        group = web.add_web_arguments(argparser)
        argv = [
            abs_filename, '--quiet', '--port',
            str(test_utils.get_test_port())
        ]
        if extra_args:
            argv.extend(extra_args)
        webargs = argparser.parse_args(argv)

        web.scrape_webapp(webargs, self.check_page_okay, self.ignore_regexp)
Exemple #2
0
 def scrape(self, filename, **extra):
     abs_filename = path.join(test_utils.find_repository_root(__file__),
                              'examples', filename)
     scrape.scrape(abs_filename, self.check_page_okay,
                   test_utils.get_test_port(), self.ignore_regexp, **extra)
Exemple #3
0
 def get_args(self):
     return ['--quiet', '--port', str(test_utils.get_test_port())]