diff -r 0d9c00ae2755 -r 1d071843f134 src/ldt/ldt/ldt_utils/tests/view_tests.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/ldt/ldt/ldt_utils/tests/view_tests.py Thu Oct 25 11:43:01 2012 +0200 @@ -0,0 +1,38 @@ +""" +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 ldt.test.testcases import OAuthWebTestCase, TestCase +from django.conf import settings +from django.test import TestCase +from ldt.ldt_utils.models import User, Project, Content, Media +from ldt.ldt_utils.utils import LdtUtils, LdtAnnotation, create_ldt, create_empty_iri, copy_ldt +from ldt.test.client import Client +import lxml.etree +import tempfile +import unittest +import uuid +import logging + +class ViewsTest(unittest.TestCase): + def setUp(self): + self.project = Project() + self.project.id = "121" + self.project.save() + self.project.ldt = ' CA: prof et admin <abstract/> <audio source=""/> <tags/> </element> <element id="s_0050F043-3AD2-0A7C-6699-D2A03A1EBA02" begin="5052858" dur="124407" author="" date="2010/09/02" color="10053375" src=""> <title>conseil de classe Reprise de la figure precedente TC: prof et admin Conseil de classe conseil de classe Reprise de la figure precedente Bout a bout 1 ' + + self.cont1 = Content(iriurl="/laurentcantet_entrelesmurs/iriurl1") + self.cont1.iri_id = 'laurentcantet_entrelesmurs' + self.cont1.save() + + self.cont2 = Content(iriurl="/content_notinldt/iriurl2") + self.cont2.iri_id = 'content_notinldt' + self.cont2.save() + + self.project.contents.add(self.cont1, self.cont2) + + def tearDown(self): + self.project.delete()