testutils.py: odsazení
This commit is contained in:
parent
d14acdd77e
commit
ca824164f4
1 changed files with 3 additions and 3 deletions
|
@ -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():
|
||||||
|
|
Loading…
Reference in a new issue