e7230b7391
* 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
17 lines
512 B
Python
17 lines
512 B
Python
from unittest import TestCase
|
|
|
|
from openslides.utils.models import AbsoluteUrlMixin
|
|
|
|
|
|
class TestAbsoluteUrlMixin(TestCase):
|
|
def test_get_absolute_url(self):
|
|
"""
|
|
Tests, that AbsoluteUrlMixin raises a ValueError if called.
|
|
"""
|
|
object = AbsoluteUrlMixin()
|
|
|
|
with self.assertRaisesRegex(
|
|
ValueError,
|
|
'Unknown Link "argument" for model "<class \'openslides.utils.models.AbsoluteUrlMixin\'>"'):
|
|
object.get_absolute_url('argument')
|