OpenSlides/tests/unit/utils/test_utils.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

15 lines
453 B
Python

from unittest import TestCase
from openslides.utils.utils import html_strong, int_or_none
class Test_functions(TestCase):
def test_html_strong(self):
self.assertEqual(html_strong('some text'), '<strong>some text</strong>')
def test_int_or_none(self):
self.assertEqual(int_or_none('5'), 5)
self.assertEqual(int_or_none(5), 5)
self.assertIsNone(int_or_none('text'))
self.assertIsNone(int_or_none(None))