2bcab5d098
- moved all server related things into the folder `server`, so this configuration is parallel to the client. - All main "services" are now folders in the root directory - Added Dockerfiles to each service (currently server and client) - Added a docker compose configuration to start everything together. Currently there are heavy dependencies into https://github.com/OpenSlides/openslides-docker-compose - Resturctured the .gitignore. If someone needs something excluded, please add it to the right section. - Added initial build setup with Docker and docker-compose. - removed setup.py. We won't deliver OpenSlides via pip anymore.
25 lines
841 B
Python
25 lines
841 B
Python
from unittest import TestCase
|
|
from unittest.mock import patch
|
|
|
|
from openslides.agenda.models import Item
|
|
|
|
|
|
class TestItemTitle(TestCase):
|
|
@patch("openslides.agenda.models.Item.content_object")
|
|
def test_title_from_content_object(self, content_object):
|
|
item = Item()
|
|
content_object.get_agenda_title_information.return_value = {
|
|
"attr": "related_title"
|
|
}
|
|
|
|
self.assertEqual(item.title_information, {"attr": "related_title"})
|
|
|
|
@patch("openslides.agenda.models.Item.content_object")
|
|
def test_title_invalid_related(self, content_object):
|
|
item = Item()
|
|
content_object.get_agenda_title_information.return_value = "related_title"
|
|
del content_object.get_agenda_title_information
|
|
|
|
with self.assertRaises(NotImplementedError):
|
|
item.title_information
|