summaryrefslogtreecommitdiff
path: root/kpov_judge
diff options
context:
space:
mode:
Diffstat (limited to 'kpov_judge')
-rwxr-xr-xkpov_judge/kpov_random_helpers.py4
-rwxr-xr-xkpov_judge/test_task.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/kpov_judge/kpov_random_helpers.py b/kpov_judge/kpov_random_helpers.py
index aadce0b..c94dcb3 100755
--- a/kpov_judge/kpov_random_helpers.py
+++ b/kpov_judge/kpov_random_helpers.py
@@ -103,7 +103,7 @@ with open('random_data/slovenian_surnames.txt') as f:
surnames = [i.strip() for i in f.readlines()]
def username_gen(r):
- return r.choice(names) + r.choice(surnames) + "{0}".format(r.randint(1, 99))
+ return ("{}{}{}".format(r.choice(names), r.choice(surnames), r.randint(1, 99))).lower()
def unknown_generator(r):
return ''
@@ -127,7 +127,7 @@ def default_gen(userID, param_meta):
params = dict()
for name, meta in param_meta.iteritems():
if meta.get('generated', False):
- params[name] = default_generators(
+ params[name] = default_generators.get(
meta.get('type', None), unknown_generator)(r)
return params
diff --git a/kpov_judge/test_task.py b/kpov_judge/test_task.py
index 79521d4..b59aebc 100755
--- a/kpov_judge/test_task.py
+++ b/kpov_judge/test_task.py
@@ -23,7 +23,7 @@ import argparse
#PARAMS_URL = SERVER_URL + '{task_id}/params.json'
#SUBMIT_URL = SERVER_URL + '{task_id}/results.json'
-TASK_URL = "file://./"
+TASK_URL = "file://" + os.getcwd() + '/tasks'
PARAMS_FILE = os.path.expanduser("~/.kpov_params.yaml")
DEFAULT_LANGUAGE = 'si'