12a08b9732
Changed agenda item, so it can not be manualy created, but is always created when a custom slide, motion or assignment is created.
16 lines
491 B
Python
16 lines
491 B
Python
from openslides.agenda.models import Item
|
|
from openslides.core.models import CustomSlide
|
|
from openslides.utils.test import TestCase
|
|
|
|
|
|
class TestItemManager(TestCase):
|
|
def test_get_root_and_children_db_queries(self):
|
|
"""
|
|
Test that get_root_and_children needs only one db query.
|
|
"""
|
|
for i in range(10):
|
|
CustomSlide.objects.create(title='item{}'.format(i))
|
|
|
|
with self.assertNumQueries(1):
|
|
Item.objects.get_root_and_children()
|