Browse Source

testdata: komentář

export_seznamu_prednasek
Kateřina Čížková 6 years ago
parent
commit
6082e4ff26
  1. 4
      seminar/testutils.py

4
seminar/testutils.py

@ -114,7 +114,7 @@ def gen_organizatori(rnd, osoby, last_rocnik):
organizatori.append(Organizator.objects.create(osoba=os, organizatori.append(Organizator.objects.create(osoba=os,
user=rnd.choice(users), user=rnd.choice(users),
organizuje_od=od, organizuje_do=do)) organizuje_od=od, organizuje_do=do))
return organizatri return organizatori
def gen_ulohy_do_cisla(rnd, cislo, organizatori, resitele, slovnik_cisel, size): def gen_ulohy_do_cisla(rnd, cislo, organizatori, resitele, slovnik_cisel, size):
'''cislo = cislo cisla v rocniku, nikoli objekt Cislo ''' '''cislo = cislo cisla v rocniku, nikoli objekt Cislo '''
@ -139,7 +139,7 @@ def gen_ulohy_do_cisla(rnd, cislo, organizatori, resitele, slovnik_cisel, size):
if cislo >= 3: if cislo >= 3:
for pi in range(1, ((size + 1) // 2) + 1): for pi in range(1, ((size + 1) // 2) + 1):
poc_op = rnd.randint(1, 4) poc_op = rnd.randint(1, 4) #počet opravovatelů
poc_oboru = rnd.randint(1, 2) poc_oboru = rnd.randint(1, 2)
p = Uloha.objects.create( p = Uloha.objects.create(
nazev=" ".join([rnd.choice(jaka), rnd.choice(co)]), nazev=" ".join([rnd.choice(jaka), rnd.choice(co)]),

Loading…
Cancel
Save