Testdata: lepší generování roků u řešitelů
This commit is contained in:
parent
a341eba928
commit
ee04a25a52
1 changed files with 3 additions and 3 deletions
|
@ -77,8 +77,8 @@ def gen_osoby(rnd, size):
|
|||
prezdivka = rnd.choice(prezdivky)
|
||||
email = "@".join([unidecode.unidecode(jmeno), rnd.choice(domain)])
|
||||
telefon = "".join([str(rnd.choice([k for k in range(10)])) for i in range(9)])
|
||||
narozeni = datetime.date(rnd.randint(1980, 2020), rnd.randint(1, 12),
|
||||
rnd.randint(1, 28))
|
||||
narozeni = datetime.date(rnd.randint(1980, datetime.datetime.now().year),
|
||||
rnd.randint(1, 12), rnd.randint(1, 28))
|
||||
ulic = rnd.choice(seznam_ulic)
|
||||
cp = rnd.randint(1, 99)
|
||||
ulice = " ".join([ulic, str(cp)])
|
||||
|
@ -142,7 +142,7 @@ def gen_resitele(rnd, osoby, skoly):
|
|||
os.save()
|
||||
os.user.user_permissions.add(resitel_perm)
|
||||
resitele.append(Resitel.objects.create(osoba=os, skola=rnd.choice(skoly),
|
||||
rok_maturity=rnd.randint(2019, 2029),
|
||||
rok_maturity=os.datum_narozeni.year + rnd.randint(18, 21),
|
||||
zasilat=rnd.choice(Resitel.ZASILAT_CHOICES)[0]))
|
||||
return resitele
|
||||
|
||||
|
|
Loading…
Reference in a new issue