Commit 32e7836b by David

Add pa11y_ignore_rules_url to `paver pa11ycrawler`

parent afd31d4e
...@@ -201,6 +201,11 @@ class TestPaverPa11yCrawlerCmd(unittest.TestCase): ...@@ -201,6 +201,11 @@ class TestPaverPa11yCrawlerCmd(unittest.TestCase):
suite = Pa11yCrawler( suite = Pa11yCrawler(
'pa11ycrawler', course_key="course-v1:edX+Test101+course", 'pa11ycrawler', course_key="course-v1:edX+Test101+course",
) )
ignore = (
"pa11y_ignore_rules_url="
"https://raw.githubusercontent.com/singingwolfboy/"
"pa11ycrawler-ignore/master/ignore.yaml"
)
expected_cmd = [ expected_cmd = [
"scrapy", "scrapy",
"crawl", "crawl",
...@@ -210,6 +215,8 @@ class TestPaverPa11yCrawlerCmd(unittest.TestCase): ...@@ -210,6 +215,8 @@ class TestPaverPa11yCrawlerCmd(unittest.TestCase):
"-a", "-a",
"course_key=course-v1:edX+Test101+course", "course_key=course-v1:edX+Test101+course",
"-a", "-a",
ignore,
"-a",
"data_dir=/edx/app/edxapp/edx-platform/reports/pa11ycrawler/data", "data_dir=/edx/app/edxapp/edx-platform/reports/pa11ycrawler/data",
] ]
actual_cmd = suite.cmd actual_cmd = suite.cmd
......
...@@ -395,6 +395,7 @@ class Pa11yCrawler(BokChoyTestSuite): ...@@ -395,6 +395,7 @@ class Pa11yCrawler(BokChoyTestSuite):
Runs pa11ycrawler as staff user against the test course. Runs pa11ycrawler as staff user against the test course.
""" """
data_dir = os.path.join(self.report_dir, 'data') data_dir = os.path.join(self.report_dir, 'data')
url = "https://raw.githubusercontent.com/singingwolfboy/pa11ycrawler-ignore/master/ignore.yaml"
return [ return [
"scrapy", "scrapy",
"crawl", "crawl",
...@@ -404,5 +405,7 @@ class Pa11yCrawler(BokChoyTestSuite): ...@@ -404,5 +405,7 @@ class Pa11yCrawler(BokChoyTestSuite):
"-a", "-a",
"course_key={key}".format(key=self.course_key), "course_key={key}".format(key=self.course_key),
"-a", "-a",
"pa11y_ignore_rules_url={url}".format(url=url),
"-a",
"data_dir={dir}".format(dir=data_dir) "data_dir={dir}".format(dir=data_dir)
] ]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment