Further basic integration testing
This commit is contained in:
@@ -16,10 +16,15 @@
|
||||
{% include 'user_score_header.html' %}
|
||||
<ul class="score-answer-list">
|
||||
{% for ans, score, correct_answer in answers_and_marks %}
|
||||
<li class="user-answer-li" data-question-number="{{forloop.counter}}">Question {{forloop.counter}} - Correct answer: <span class="correct-answer">{{correct_answer}}</span>
|
||||
<br/>
|
||||
<span class="user-answer-score user-answer-score-{{score}} physics-ans">
|
||||
<pre>{{ans}}</pre> ({{score}})
|
||||
<li class="user-answer-li" data-question-number="{{forloop.counter}}">Question {{forloop.counter}} - Correct answer: {% if exam.publish_results %}<span class="correct-answer">{{correct_answer}}</span>{% endif %}
|
||||
<br/>
|
||||
<span class="user-answer-score user-answer-score-{{score}}">
|
||||
<span class="submitted-user-answer">
|
||||
<pre>{{ans}}</pre>
|
||||
</span>
|
||||
{% if exam.publish_results %}
|
||||
{{score}}
|
||||
{% endif %}
|
||||
</span>
|
||||
<span class="view-question-link" data-qn={{forloop.counter0}}>View</span>
|
||||
</li>
|
||||
|
||||
@@ -283,7 +283,7 @@ def test_exams(db, client):
|
||||
|
||||
assert answer["ans"] in str(li) # Check that the saved answer is shown
|
||||
|
||||
assert li.find("span", {"class": "correct-answer"}).string == "*****" # and that the correct answer isn't
|
||||
assert not li.find("span", {"class": "correct-answer"}) # and that the correct answer isn't
|
||||
|
||||
assert cid_exam_scores_soup.find("div", {"class": "score-overview"}) is None # check we hide the score overview if not published
|
||||
|
||||
Reference in New Issue
Block a user