Add pa11y_ignore_rules_url to paver pa11ycrawler

This commit is contained in:
David
2016-09-07 13:00:18 -04:00
parent afd31d4edf
commit 32e7836bd9
2 changed files with 10 additions and 0 deletions

View File

@@ -201,6 +201,11 @@ class TestPaverPa11yCrawlerCmd(unittest.TestCase):
suite = Pa11yCrawler(
'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 = [
"scrapy",
"crawl",
@@ -210,6 +215,8 @@ class TestPaverPa11yCrawlerCmd(unittest.TestCase):
"-a",
"course_key=course-v1:edX+Test101+course",
"-a",
ignore,
"-a",
"data_dir=/edx/app/edxapp/edx-platform/reports/pa11ycrawler/data",
]
actual_cmd = suite.cmd

View File

@@ -395,6 +395,7 @@ class Pa11yCrawler(BokChoyTestSuite):
Runs pa11ycrawler as staff user against the test course.
"""
data_dir = os.path.join(self.report_dir, 'data')
url = "https://raw.githubusercontent.com/singingwolfboy/pa11ycrawler-ignore/master/ignore.yaml"
return [
"scrapy",
"crawl",
@@ -404,5 +405,7 @@ class Pa11yCrawler(BokChoyTestSuite):
"-a",
"course_key={key}".format(key=self.course_key),
"-a",
"pa11y_ignore_rules_url={url}".format(url=url),
"-a",
"data_dir={dir}".format(dir=data_dir)
]