Skip to content

Commit 07ab50d

Browse files
Merge branch 'master' into links_to_task_attempts_151
2 parents 7d3d73d + 26b426a commit 07ab50d

File tree

5 files changed

+10
-14
lines changed

5 files changed

+10
-14
lines changed

app/feedback_evaluator.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ def __init__(self, weights=None):
165165
def find_strict_speech_duration_criterion(self, criteria_keys, suffix='StrictSpeechDurationCriterion'):
166166
for criteria in criteria_keys:
167167
if criteria.endswith(suffix):
168+
self.weights[criteria] = self.weights.pop('StrictSpeechDurationCriterion')
168169
return criteria
169170

170171
def evaluate_feedback(self, criteria_results):
@@ -178,8 +179,8 @@ def evaluate_feedback(self, criteria_results):
178179
return super().evaluate_feedback(criteria_results)
179180

180181
def get_result_as_sum_str(self, criteria_results):
181-
self.ssd_criterion = self.find_strict_speech_duration_criterion(criteria_results.keys())
182-
182+
if not self.ssd_criterion:
183+
self.ssd_criterion = self.find_strict_speech_duration_criterion(criteria_results.keys())
183184
if criteria_results is None or self.weights is None or \
184185
criteria_results.get(self.ssd_criterion, {}).get('result', 0) == 0 or \
185186
criteria_results.get("DEFAULT_SPEECH_PACE_CRITERION", {}).get('result', 0) == 0:

app/templates/footer.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{% block footer %}
2-
<div align="center">&copy; Сopyright OSLL 2020<script language="javascript" type="text/javascript">
2+
<div align="center">&copy; Сopyright MOEVM 2020<script language="javascript" type="text/javascript">
33
var d = new Date();
44
if(d.getFullYear()>2020)
55
document.write("-"+d.getFullYear());

app_conf/testing.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,5 @@ firefox=87
4545
language=ru
4646

4747
[bugreport]
48-
form_link=https://docs.google.com/forms/d/e/1FAIpQLScUudcDPUwtTvmN_sbeljicHYhubK7pPQIM1o8Wh54HstT2BQ/viewform?usp=sf_link
49-
report_mail=[email protected]
48+
form_link=https://docs.google.com
49+
report_mail=[email protected]

tests/test_app.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,12 @@
33
from app.web_speech_trainer import app
44

55

6-
def test_home_page():
7-
"""
8-
GIVEN a Flask application configured for testing
9-
WHEN the '/' page is requested (GET)
10-
THEN check that the response is valid
11-
"""
6+
def test_init_page():
127
flask_app = app
138

149
with flask_app.test_client() as test_client:
15-
response = test_client.get('/')
16-
assert response.status_code == 404
10+
response = test_client.get('/init/')
11+
assert response.status_code == 200
1712

1813

1914
def test_fillers_ratio_criteria():

tests/test_feedback_evaluator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class TestPredefenceEightToTenMinutesNoSlideCheckFeedbackEvaluator:
2020
"PredefenceStrictSpeechDurationCriterion": {'result': 0.5},
2121
"DEFAULT_SPEECH_PACE_CRITERION": {'result': 0.7},
2222
"DEFAULT_FILLERS_NUMBER_CRITERION": {'result': 0.9},
23-
}, '0.600 * 0.50 + 0.200 * 0.70 + 0.200 * 0.90'),
23+
}, '0.200 * 0.70 + 0.200 * 0.90 + 0.600 * 0.50'),
2424
],
2525
)
2626
def test_get_result_as_sum_str(self, criteria_results, expected_string):

0 commit comments

Comments
 (0)