summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2019-01-18 02:18:07 +0100
committeremkael <emkael@tlen.pl>2019-01-18 02:18:07 +0100
commit3c13b8b8bb06587f3e3607dcf365a1d278e60447 (patch)
treefdb08b0a5998216eb6fbd0cb02ad8ca710abff5d /test
parent8b7e00cab9bed95f384732879d33dd78f6ade54d (diff)
Fixes for test parameters compilation
Diffstat (limited to 'test')
-rw-r--r--test/apitest/api.py1
-rw-r--r--test/apitest/pzbs.py6
2 files changed, 3 insertions, 4 deletions
diff --git a/test/apitest/api.py b/test/apitest/api.py
index 4a52296..54ae17d 100644
--- a/test/apitest/api.py
+++ b/test/apitest/api.py
@@ -29,7 +29,6 @@ class ApiCalculator(ApiTest):
params['contestants'] = cont_count
params['title_sum'] = cont_rank
if override:
- params['manual'] = {}
if 'points' in override:
params['manual[min_points]'] = override['points']
if 'weight' in override:
diff --git a/test/apitest/pzbs.py b/test/apitest/pzbs.py
index 1a1f69f..84488ff 100644
--- a/test/apitest/pzbs.py
+++ b/test/apitest/pzbs.py
@@ -43,12 +43,12 @@ class PzbsCalculator(ApiTest):
params['iuc'] = cont_count
params['izw'] = cont_count * self.tourtypes[tour_type]
params['swk'] = cont_rank
- params['srd'] = cont_rank / (cont_count * self.tourtypes[tour_type])
+ params['srd'] = max(0.15, cont_rank / (cont_count * self.tourtypes[tour_type]))
if override:
if 'points' in override:
- params['min' + str(params['typ']) + '_'*params['rozdan']] = override['points']
+ params['min' + str(params['rng']) + '_'*params['rozdan']] = override['points']
if 'weight' in override:
- params['r' + ['', 'gg', 'gp', 'ot', 'ok1', 'ok', 'tp', 'to', 'tk'][params['typ']] + '_'*params['rozdan']] = override['weight']
+ params['r' + ['', 'gg', 'gp', 'ot', 'ok1', 'ok', 'tp', 'to', 'tk'][params['rng']] + '_'*params['rozdan']] = override['weight']
if 'players' in override:
params['zaw'] = override['players']
if 'cutoff' in override: