testutils.py: odsazení

This commit is contained in:
Jakub Kuba Růžička 2019-05-23 23:44:44 +02:00
parent d14acdd77e
commit ca824164f4

View file

@ -165,10 +165,10 @@ def gen_ulohy_do_cisla(rnd, cislo, organizatori, resitele, slovnik_cisel, size):
res_vyber = rnd.sample(resitele, min(poc_reseni, len(resitele) - 2)) res_vyber = rnd.sample(resitele, min(poc_reseni, len(resitele) - 2))
for resitel in res_vyber: for resitel in res_vyber:
res = Reseni.objects.create(problem = p, res = Reseni.objects.create(problem = p,
resitele=[resitel], resitele=[resitel],
forma=rnd.choice(Reseni.FORMA_CHOICES)) forma=rnd.choice(Reseni.FORMA_CHOICES))
hod = Hodnoceni.objects.create(body=rnd.randint(0, p.max_body), hod = Hodnoceni.objects.create(body=rnd.randint(0, p.max_body),
cislo_body=slovnik_cisel[cislo], reseni=res, problem=p) cislo_body=slovnik_cisel[cislo], reseni=res, problem=p)
return return
def gen_soustredeni(): def gen_soustredeni():