From 997e4bcdfded5f89d41e493bb332f581596b4694 Mon Sep 17 00:00:00 2001 From: Tomas Gavenciak Date: Thu, 2 Apr 2015 00:12:45 +0200 Subject: [PATCH] Male zlepseni test. dat --- seminar/testutils.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/seminar/testutils.py b/seminar/testutils.py index d26ad272..a2888194 100644 --- a/seminar/testutils.py +++ b/seminar/testutils.py @@ -55,8 +55,6 @@ def create_test_data(size = 6, rnd = None): # cisla cisel = rnd.randint(4, 6) - if ri == last_rocnik: - cisel = 1 cs = {} for ci in range(1, cisel + 1): @@ -84,5 +82,5 @@ def create_test_data(size = 6, rnd = None): body = rnd.randint(0, p.body), cislo_body = cs[ci]) nastaveni = Nastaveni.objects.create(aktualni_rocnik = Rocnik.objects.last(), - aktualni_cislo = Cislo.objects.last()) + aktualni_cislo = Cislo.objects.all()[1])