Browse Source

testutils.py: odsazení

export_seznamu_prednasek
Jakub Kuba Růžička 6 years ago
parent
commit
ca824164f4
  1. 6
      seminar/testutils.py

6
seminar/testutils.py

@ -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…
Cancel
Save