From 645839b81d9efc90022b8152eac6c3a36cb18301 Mon Sep 17 00:00:00 2001 From: Christine Lytwynec Date: Fri, 22 Apr 2016 12:48:34 -0400 Subject: [PATCH] Fix default args for paver pa11ycrawler --- pavelib/bok_choy.py | 4 ++-- pavelib/utils/test/suites/bokchoy_suite.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pavelib/bok_choy.py b/pavelib/bok_choy.py index 1a206c1aa5..885a92f571 100644 --- a/pavelib/bok_choy.py +++ b/pavelib/bok_choy.py @@ -152,8 +152,8 @@ def pa11ycrawler(options): opts = parse_bokchoy_opts(options) opts['report_dir'] = Env.PA11YCRAWLER_REPORT_DIR opts['coveragerc'] = Env.PA11YCRAWLER_COVERAGERC - opts['should_fetch_course'] = getattr(options, 'should_fetch_course', None) - opts['course_key'] = getattr(options, 'course-key', None) + opts['should_fetch_course'] = getattr(options, 'should_fetch_course', not opts['fasttest']) + opts['course_key'] = getattr(options, 'course-key', "course-v1:edX+Test101+course") test_suite = Pa11yCrawler('a11y_crawler', **opts) test_suite.run() diff --git a/pavelib/utils/test/suites/bokchoy_suite.py b/pavelib/utils/test/suites/bokchoy_suite.py index cca35aa704..19d51da7b5 100644 --- a/pavelib/utils/test/suites/bokchoy_suite.py +++ b/pavelib/utils/test/suites/bokchoy_suite.py @@ -268,7 +268,7 @@ class Pa11yCrawler(BokChoyTestSuite): def __init__(self, *args, **kwargs): super(Pa11yCrawler, self).__init__(*args, **kwargs) - self.course_key = kwargs.get('course_key', "course-v1:edX+Test101+course") + self.course_key = kwargs.get('course_key') if self.imports_dir: # If imports_dir has been specified, assume the files are # already there -- no need to fetch them from github. This @@ -279,7 +279,7 @@ class Pa11yCrawler(BokChoyTestSuite): # Otherwise, obey `--skip-fetch` command and use the default # test course. Note that the fetch will also be skipped when # using `--fast`. - self.should_fetch_course = kwargs.get('should_fetch_course', not self.fasttest) + self.should_fetch_course = kwargs.get('should_fetch_course') self.imports_dir = path('test_root/courses/') self.pa11y_report_dir = os.path.join(self.report_dir, 'pa11ycrawler_reports')