Browse Source

testutils: oprava indentace

export_seznamu_prednasek
Anet 6 years ago
parent
commit
5afa47c18e
  1. 10
      seminar/testutils.py

10
seminar/testutils.py

@ -163,11 +163,11 @@ def gen_ulohy_do_cisla(cislo, organizatori, resitele, slovnik_cisel, size):
poc_resitel = rnd.randint(1, 3) poc_resitel = rnd.randint(1, 3)
res_sel = rnd.sample(resitele, min(poc_reseni, len(resitele) - 2)) res_sel = rnd.sample(resitele, min(poc_reseni, len(resitele) - 2))
for resitel in res_sel: for resitel in res_sel:
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

Loading…
Cancel
Save