Commit e29f446d by Se Won Jang Committed by Stephen Sanchez

fixed tests

parent 9a6b5086
......@@ -6,6 +6,7 @@
"training_num_current": 1,
"training_num_available": 2,
"training_essay": "This is my answer.",
"allow_latex": False,
"training_rubric": {
"criteria": [
{
......
......@@ -171,7 +171,8 @@ class TestLeaderboardRender(XBlockHandlerTransactionTestCase):
xblock,
'openassessmentblock/leaderboard/oa_leaderboard_show.html',
{
'topscores': scores
'topscores': scores,
'allow_latex': xblock.allow_latex,
},
workflow_status='done'
)
......
......@@ -237,6 +237,7 @@ class TestPeerAssessmentRender(XBlockHandlerTestCase):
'rubric_criteria': xblock.rubric_criteria,
'must_grade': 5,
'review_num': 1,
'allow_latex': False,
}
self._assert_path_and_context(
xblock, 'openassessmentblock/peer/oa_peer_unavailable.html', expected_context
......@@ -252,6 +253,7 @@ class TestPeerAssessmentRender(XBlockHandlerTestCase):
'rubric_criteria': xblock.rubric_criteria,
'must_grade': 5,
'review_num': 1,
'allow_latex': False,
}
self._assert_path_and_context(
xblock, 'openassessmentblock/peer/oa_peer_closed.html', expected_context
......@@ -267,6 +269,7 @@ class TestPeerAssessmentRender(XBlockHandlerTestCase):
'rubric_criteria': xblock.rubric_criteria,
'must_grade': 5,
'review_num': 1,
'allow_latex': False,
}
self._assert_path_and_context(
xblock, 'openassessmentblock/peer/oa_peer_unavailable.html', expected_context
......@@ -285,6 +288,7 @@ class TestPeerAssessmentRender(XBlockHandlerTestCase):
'must_grade': 5,
'review_num': 1,
'submit_button_text': 'submit your assessment & move to response #2',
'allow_latex': False,
}
self._assert_path_and_context(
xblock, 'openassessmentblock/peer/oa_peer_waiting.html',
......@@ -324,6 +328,7 @@ class TestPeerAssessmentRender(XBlockHandlerTestCase):
'allow_file_upload': False,
'peer_file_url': '',
'submit_button_text': 'submit your assessment & move to response #2',
'allow_latex': False,
}
self._assert_path_and_context(
xblock, 'openassessmentblock/peer/oa_peer_assessment.html',
......@@ -345,6 +350,7 @@ class TestPeerAssessmentRender(XBlockHandlerTestCase):
'must_grade': 5,
'review_num': 1,
'submit_button_text': 'submit your assessment & move to response #2',
'allow_latex': False,
}
self._assert_path_and_context(
xblock, 'openassessmentblock/peer/oa_peer_closed.html',
......@@ -380,6 +386,7 @@ class TestPeerAssessmentRender(XBlockHandlerTestCase):
'must_grade': 5,
'review_num': 1,
'submit_button_text': 'submit your assessment & move to response #2',
'allow_latex': False,
}
self._assert_path_and_context(
xblock, 'openassessmentblock/peer/oa_peer_closed.html',
......@@ -407,6 +414,7 @@ class TestPeerAssessmentRender(XBlockHandlerTestCase):
'rubric_criteria': xblock.rubric_criteria,
'must_grade': 5,
'review_num': 1,
'allow_latex': False,
}
self._assert_path_and_context(
......@@ -436,6 +444,7 @@ class TestPeerAssessmentRender(XBlockHandlerTestCase):
'review_num': 1,
'rubric_criteria': xblock.rubric_criteria,
'submit_button_text': 'Submit your assessment & review another response',
'allow_latex': False,
}
self._assert_path_and_context(
xblock, 'openassessmentblock/peer/oa_peer_turbo_mode_waiting.html',
......@@ -463,6 +472,7 @@ class TestPeerAssessmentRender(XBlockHandlerTestCase):
'review_num': 1,
'rubric_criteria': xblock.rubric_criteria,
'submit_button_text': 'Submit your assessment & review another response',
'allow_latex': False,
}
self._assert_path_and_context(
xblock, 'openassessmentblock/peer/oa_peer_turbo_mode.html',
......@@ -484,6 +494,7 @@ class TestPeerAssessmentRender(XBlockHandlerTestCase):
'review_num': 1,
'rubric_criteria': xblock.rubric_criteria,
'submit_button_text': 'Submit your assessment & review another response',
'allow_latex': False,
}
self._assert_path_and_context(
xblock, 'openassessmentblock/peer/oa_peer_unavailable.html',
......
......@@ -167,7 +167,7 @@ class TestSelfAssessmentRender(XBlockHandlerTestCase):
self._assert_path_and_context(
xblock,
'openassessmentblock/self/oa_self_unavailable.html',
{'self_start': datetime.datetime(5999, 1, 1).replace(tzinfo=pytz.utc)}
{'self_start': datetime.datetime(5999, 1, 1).replace(tzinfo=pytz.utc), 'allow_latex': False}
)
@scenario('data/self_assessment_closed.xml', user_id='Bob')
......@@ -176,14 +176,14 @@ class TestSelfAssessmentRender(XBlockHandlerTestCase):
self._assert_path_and_context(
xblock,
'openassessmentblock/self/oa_self_closed.html',
{'self_due': datetime.datetime(2000, 1, 1).replace(tzinfo=pytz.utc)}
{'self_due': datetime.datetime(2000, 1, 1).replace(tzinfo=pytz.utc), 'allow_latex': False}
)
@scenario('data/self_assessment_open.xml', user_id='Bob')
def test_open_no_submission(self, xblock):
# Without making a submission, this step should be unavailable
self._assert_path_and_context(
xblock, 'openassessmentblock/self/oa_self_unavailable.html', {}
xblock, 'openassessmentblock/self/oa_self_unavailable.html', {'allow_latex': False}
)
@scenario('data/self_assessment_open.xml', user_id='James Brown')
......@@ -195,7 +195,7 @@ class TestSelfAssessmentRender(XBlockHandlerTestCase):
# Should still not be able to access self-assessment
self._assert_path_and_context(
xblock, 'openassessmentblock/self/oa_self_unavailable.html', {}
xblock, 'openassessmentblock/self/oa_self_unavailable.html', {'allow_latex': False}
)
@scenario('data/self_assessment_open.xml', user_id='James Brown')
......@@ -207,7 +207,7 @@ class TestSelfAssessmentRender(XBlockHandlerTestCase):
xblock.get_student_item_dict(), u"𝓟𝓪𝓼𝓼 𝓽𝓱𝓮 𝓹𝓮𝓪𝓼"
)
self._assert_path_and_context(
xblock, 'openassessmentblock/self/oa_self_complete.html', {},
xblock, 'openassessmentblock/self/oa_self_complete.html', {'allow_latex': False},
workflow_status='waiting',
status_details={
'self': {'complete': True},
......@@ -224,7 +224,7 @@ class TestSelfAssessmentRender(XBlockHandlerTestCase):
# In the self --> peer configuration, self can be complete
# if our status is "peer"
self._assert_path_and_context(
xblock, 'openassessmentblock/self/oa_self_complete.html', {},
xblock, 'openassessmentblock/self/oa_self_complete.html', {'allow_latex': False},
workflow_status="peer",
status_details={
'self': {'complete': True},
......@@ -239,7 +239,7 @@ class TestSelfAssessmentRender(XBlockHandlerTestCase):
xblock.get_student_item_dict(), u"Ⱥɨn'ŧ ɨŧ fᵾnꝁɏ"
)
self._assert_path_and_context(
xblock, 'openassessmentblock/self/oa_self_complete.html', {},
xblock, 'openassessmentblock/self/oa_self_complete.html', {'allow_latex':False},
workflow_status='done'
)
......@@ -257,6 +257,7 @@ class TestSelfAssessmentRender(XBlockHandlerTestCase):
'self_submission': submission,
'allow_file_upload': False,
'self_file_url': '',
'allow_latex': False,
},
workflow_status='self',
submission_uuid=submission['uuid']
......@@ -277,7 +278,7 @@ class TestSelfAssessmentRender(XBlockHandlerTestCase):
create_rubric_dict(xblock.prompt, xblock.rubric_criteria)
)
self._assert_path_and_context(
xblock, 'openassessmentblock/self/oa_self_complete.html', {},
xblock, 'openassessmentblock/self/oa_self_complete.html', {'allow_latex': False},
workflow_status='self',
submission_uuid=submission['uuid']
)
......@@ -292,7 +293,7 @@ class TestSelfAssessmentRender(XBlockHandlerTestCase):
self._assert_path_and_context(
xblock,
'openassessmentblock/self/oa_self_closed.html',
{'self_due': datetime.datetime(2000, 1, 1).replace(tzinfo=pytz.utc)},
{'self_due': datetime.datetime(2000, 1, 1).replace(tzinfo=pytz.utc), 'allow_latex': False},
workflow_status='self',
submission_uuid=submission['uuid']
)
......@@ -319,7 +320,7 @@ class TestSelfAssessmentRender(XBlockHandlerTestCase):
# we ALWAYS show complete, even if the workflow tells us we're still have status 'self'.
self._assert_path_and_context(
xblock, 'openassessmentblock/self/oa_self_complete.html',
{'self_due': datetime.datetime(2000, 1, 1).replace(tzinfo=pytz.utc)},
{'self_due': datetime.datetime(2000, 1, 1).replace(tzinfo=pytz.utc), 'allow_latex': False},
workflow_status='self',
submission_uuid=submission['uuid']
)
......
......@@ -290,7 +290,8 @@ class StudentTrainingRenderTest(StudentTrainingTest):
xblock.create_submission(xblock.get_student_item_dict(), self.SUBMISSION)
expected_template = "openassessmentblock/student_training/student_training_closed.html"
expected_context = {
'training_due': "2000-01-01T00:00:00+00:00"
'training_due': "2000-01-01T00:00:00+00:00",
'allow_latex': False,
}
self.assert_path_and_context(xblock, expected_template, expected_context)
......@@ -307,6 +308,7 @@ class StudentTrainingRenderTest(StudentTrainingTest):
xblock.create_submission(xblock.get_student_item_dict(), self.SUBMISSION)
expected_template = "openassessmentblock/student_training/student_training_unavailable.html"
expected_context = {
'training_start': datetime.datetime(3000, 1, 1).replace(tzinfo=pytz.utc)
'training_start': datetime.datetime(3000, 1, 1).replace(tzinfo=pytz.utc),
'allow_latex': False,
}
self.assert_path_and_context(xblock, expected_template, expected_context)
......@@ -102,7 +102,8 @@ class SubmissionRenderTest(XBlockHandlerTestCase):
'allow_file_upload': False,
'submission_start': dt.datetime(4999, 4, 1).replace(tzinfo=pytz.utc),
'has_peer': True,
'has_self': True
'has_self': True,
'allow_latex': False,
}
)
......@@ -123,7 +124,8 @@ class SubmissionRenderTest(XBlockHandlerTestCase):
'student_submission': submission,
'allow_file_upload': False,
'has_peer': True,
'has_self': True
'has_self': True,
'allow_latex': False,
}
)
......@@ -138,7 +140,8 @@ class SubmissionRenderTest(XBlockHandlerTestCase):
'submit_enabled': False,
'submission_due': dt.datetime(2999, 5, 6).replace(tzinfo=pytz.utc),
'has_peer': True,
'has_self': True
'has_self': True,
'allow_latex': False,
}
)
......@@ -152,7 +155,8 @@ class SubmissionRenderTest(XBlockHandlerTestCase):
'save_status': 'This response has not been saved.',
'submit_enabled': False,
'has_peer': True,
'has_self': False
'has_self': False,
'allow_latex': False,
}
)
......@@ -172,7 +176,8 @@ class SubmissionRenderTest(XBlockHandlerTestCase):
'submit_enabled': True,
'submission_due': dt.datetime(2999, 5, 6).replace(tzinfo=pytz.utc),
'has_peer': True,
'has_self': True
'has_self': True,
'allow_latex': False,
}
)
......@@ -189,7 +194,8 @@ class SubmissionRenderTest(XBlockHandlerTestCase):
'student_submission': submission,
'allow_file_upload': False,
'has_peer': True,
'has_self': True
'has_self': True,
'allow_latex': False,
}
)
......@@ -201,7 +207,8 @@ class SubmissionRenderTest(XBlockHandlerTestCase):
'allow_file_upload': False,
'submission_due': dt.datetime(2014, 4, 5).replace(tzinfo=pytz.utc),
'has_peer': False,
'has_self': True
'has_self': True,
'allow_latex': False,
}
)
......@@ -218,7 +225,8 @@ class SubmissionRenderTest(XBlockHandlerTestCase):
'student_submission': submission,
'allow_file_upload': False,
'has_peer': False,
'has_self': True
'has_self': True,
'allow_latex': False,
}
)
......@@ -243,7 +251,8 @@ class SubmissionRenderTest(XBlockHandlerTestCase):
'student_submission': submission,
'allow_file_upload': False,
'has_peer': True,
'has_self': True
'has_self': True,
'allow_latex': False,
}
)
......@@ -268,7 +277,8 @@ class SubmissionRenderTest(XBlockHandlerTestCase):
'student_submission': submission,
'allow_file_upload': False,
'has_peer': False,
'has_self': True
'has_self': True,
'allow_latex': False,
}
)
......
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