OpenSlides/tests/old/agenda/models.py
Oskar Hahn e7230b7391 New Test order.
* seperate unittests and integration tests
* moved old tests in seperat folder 'old'
* created a testrunner that does not create a testdatabase, if only unittests are run
* wrote some unit- and integration tests as examples
* fixed user.get_short_name() to use the sort order from config
* fixed wrong url_pattern in the user app
2015-01-24 18:00:03 +01:00

29 lines
719 B
Python

from django.db import models
from openslides.projector.models import SlideMixin
class RelatedItem(SlideMixin, models.Model):
slide_callback_name = 'test_related_item'
name = models.CharField(max_length='255')
class Meta:
verbose_name = 'Related Item CHFNGEJ5634DJ34F'
def get_agenda_title(self):
return self.name
def get_agenda_title_supplement(self):
return 'test item'
def get_absolute_url(self, link=None):
if link is None:
value = '/absolute-url-here/'
else:
value = super(RelatedItem, self).get_absolute_url(link)
return value
class BadRelatedItem(models.Model):
name = models.CharField(max_length='255')