# coding: utf-8
from django.test import TestCase
from models import MultiContentItem, SimpleMemoItem

class ItemModelTestCase(TestCase):
    def setUp(self):
        pass

    def test_create(self):
        m1 = SimpleMemoItem(name=u'シンプルメモ', content='ContentTypeの\n利用例')
        m1.save(True, force_update=False)
        m2 = MultiContentItem.objects.get(pk=m1.pk)
        self.assertEqual(m1, m2.original)

    def test_template(self):
        m1 = SimpleMemoItem(name=u'テンプレートテスト', content='ContentTypeの\n利用例')
        m1.save()
        self.assertEqual('multicontents/_simplememoitem.html', m1.template_name)
