Commit 7a3a56d4 by Vik Paruchuri

Fixing tests

parent 5f29e0e1
......@@ -12,6 +12,8 @@ import capa.xqueue_interface as xqueue_interface
from datetime import datetime
from . import test_system
import test_util_open_ended
"""
Tests for the various pieces of the CombinedOpenEndedGrading system
......@@ -163,8 +165,8 @@ class OpenEndedModuleTest(unittest.TestCase):
'accept_file_upload': False,
'rewrite_content_links' : "",
'close_date': None,
's3_interface' : "",
'open_ended_grading_interface' : {},
's3_interface' : test_util_open_ended.S3_INTERFACE,
'open_ended_grading_interface' : test_util_open_ended.OPEN_ENDED_GRADING_INTERFACE,
}
oeparam = etree.XML('''
......@@ -297,8 +299,8 @@ class CombinedOpenEndedModuleTest(unittest.TestCase):
'accept_file_upload' : False,
'rewrite_content_links' : "",
'close_date' : "",
's3_interface' : "",
'open_ended_grading_interface' : {},
's3_interface' : test_util_open_ended.S3_INTERFACE,
'open_ended_grading_interface' : test_util_open_ended.OPEN_ENDED_GRADING_INTERFACE,
}
oeparam = etree.XML('''
......
......@@ -9,6 +9,7 @@ from nose.plugins.skip import SkipTest
from . import test_system
import test_util_open_ended
class SelfAssessmentTest(unittest.TestCase):
......@@ -48,8 +49,8 @@ class SelfAssessmentTest(unittest.TestCase):
'display_name': "Name",
'accept_file_upload': False,
'close_date': None,
's3_interface' : "",
'open_ended_grading_interface' : {},
's3_interface' : test_util_open_ended.S3_INTERFACE,
'open_ended_grading_interface' : test_util_open_ended.OPEN_ENDED_GRADING_INTERFACE,
}
self.module = SelfAssessmentModule(test_system, self.location,
......
OPEN_ENDED_GRADING_INTERFACE = {
'url' : 'http://127.0.0.1:3033/',
'username' : 'incorrect',
'password' : 'incorrect',
'staff_grading' : 'staff_grading',
'peer_grading' : 'peer_grading',
'grading_controller' : 'grading_controller'
}
S3_INTERFACE = {
'aws_access_key' : "",
'aws_secret_key' : "",
"aws_bucket_name" : "",
}
\ No newline at end of file
......@@ -26,6 +26,8 @@ log = logging.getLogger(__name__)
from override_settings import override_settings
from django.http import QueryDict
from xmodule.tests import test_util_open_ended
@override_settings(MODULESTORE=ct.TEST_DATA_XML_MODULESTORE)
class TestStaffGradingService(ct.PageLoader):
......@@ -144,7 +146,10 @@ class TestPeerGradingService(ct.PageLoader):
location = "i4x://edX/toy/peergrading/init"
self.mock_service = peer_grading_service.MockPeerGradingService()
self.system = ModuleSystem(location, None, None, render_to_string, None, s3_interface = "", open_ended_grading_interface={})
self.system = ModuleSystem(location, None, None, render_to_string, None,
s3_interface = test_util_open_ended.S3_INTERFACE,
open_ended_grading_interface=test_util_open_ended.OPEN_ENDED_GRADING_INTERFACE
)
self.descriptor = peer_grading_module.PeerGradingDescriptor(self.system)
self.peer_module = peer_grading_module.PeerGradingModule(self.system, location, "<peergrading/>", self.descriptor)
self.peer_module.peer_gs = self.mock_service
......
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