OpenSlides/tests/integration/agenda/test_models.py
Norman Jäckel cab53f0434 Moved custom slides to own app topics for better app structure.
Renamed model to Topic. Added migrations file. Fixed #2402.
2016-09-21 15:00:23 +02:00

16 lines
481 B
Python

from openslides.agenda.models import Item
from openslides.topics.models import Topic
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):
Topic.objects.create(title='item{}'.format(i))
with self.assertNumQueries(1):
Item.objects.get_root_and_children()