~ltp-devs/loco-team-portal/0.2

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# -*- coding: utf-8 -*-
"""
This file demonstrates two different styles of tests (one doctest and one
unittest). These will both pass when you run "manage.py test".

Replace these with more appropriate tests for your application.
"""

from django.test import TestCase
from meetings.models import AgendaItem


class UnicodeTest(TestCase):

    def setUp(self):
        super(UnicodeTest, self).setUp()
        self.test_string = u'test \xc3 string'

    def test_unicode_agenda_title(self):
        item = AgendaItem(title=self.test_string)
        self.assertEquals(unicode(item), self.test_string)

        child = AgendaItem(title=self.test_string, parent=item)
        self.assertEquals(unicode(child), u'%s->%s' % (self.test_string, self.test_string))