From 2d59d44bb5c89e62cd317fa9a0e79bc0263bee7e Mon Sep 17 00:00:00 2001 From: David Baumgold Date: Thu, 6 Feb 2014 11:55:41 -0500 Subject: [PATCH 1/2] Clarify DATA_DIR path --- common/lib/xmodule/xmodule/tests/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/lib/xmodule/xmodule/tests/__init__.py b/common/lib/xmodule/xmodule/tests/__init__.py index caac60e71f..c6e0df99aa 100644 --- a/common/lib/xmodule/xmodule/tests/__init__.py +++ b/common/lib/xmodule/xmodule/tests/__init__.py @@ -24,10 +24,10 @@ from xmodule.error_module import ErrorDescriptor from xmodule.modulestore.xml import LocationReader +MODULE_DIR = path(__file__).dirname() # Location of common test DATA directory # '../../../../edx-platform/common/test/data/' -MODULE_DIR = path(__file__).dirname() -DATA_DIR = path.joinpath(*MODULE_DIR.splitall()[:-4]) / 'test/data/' +DATA_DIR = MODULE_DIR.parent.parent.parent.parent / "test" / "data" open_ended_grading_interface = { From 698aedc329e14e02dc365d9b27734e5a7d07a219 Mon Sep 17 00:00:00 2001 From: David Baumgold Date: Thu, 6 Feb 2014 11:56:46 -0500 Subject: [PATCH 2/2] better pylint formatting --- common/lib/xmodule/xmodule/tests/__init__.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/common/lib/xmodule/xmodule/tests/__init__.py b/common/lib/xmodule/xmodule/tests/__init__.py index c6e0df99aa..28e612926a 100644 --- a/common/lib/xmodule/xmodule/tests/__init__.py +++ b/common/lib/xmodule/xmodule/tests/__init__.py @@ -31,13 +31,13 @@ DATA_DIR = MODULE_DIR.parent.parent.parent.parent / "test" / "data" open_ended_grading_interface = { - 'url': 'blah/', - 'username': 'incorrect_user', - 'password': 'incorrect_pass', - 'staff_grading' : 'staff_grading', - 'peer_grading' : 'peer_grading', - 'grading_controller' : 'grading_controller' - } + 'url': 'blah/', + 'username': 'incorrect_user', + 'password': 'incorrect_pass', + 'staff_grading': 'staff_grading', + 'peer_grading': 'peer_grading', + 'grading_controller': 'grading_controller', +} class TestModuleSystem(ModuleSystem): # pylint: disable=abstract-method