# -*- coding: utf-8 -*-
import unittest
from waeup.kofa.students.utils import formatted_text
class FormatterTests(unittest.TestCase):
def test_formatted_text(self):
# we can format strings, unicode and things convertable to unicode.
result1 = formatted_text('sample')
result2 = formatted_text('ümlaut')
result3 = formatted_text(3)
result4 = formatted_text(u'unicöde')
result5 = formatted_text(u'sample', color='red')
self.assertTrue(isinstance(result1, unicode))
self.assertEqual(
result1, u'sample')
self.assertEqual(
result2, u'ümlaut')
self.assertEqual(
result3, u'3')
self.assertEqual(
result4, u'unicöde')
self.assertEqual(
result5, u'sample')
return