Browse Source

testutils.py: %s/_res/_vyber/

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

4
seminar/testutils.py

@ -161,8 +161,8 @@ def gen_ulohy_do_cisla(cislo, organizatori, resitele, slovnik_cisel, size):
# reseni ulohy # reseni ulohy
poc_reseni = rnd.randint(size // 2, size * 2) poc_reseni = rnd.randint(size // 2, size * 2)
poc_resitel = rnd.randint(1, 3) poc_resitel = rnd.randint(1, 3)
res_sel = rnd.sample(resitele, min(poc_reseni, len(resitele) - 2)) res_vyber = rnd.sample(resitele, min(poc_reseni, len(resitele) - 2))
for resitel in res_sel: 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))

Loading…
Cancel
Save