| author | wakimd |
| Tue, 23 Nov 2010 17:54:36 +0100 | |
| changeset 21 | 1a061f244254 |
| parent 19 | 7cf81d58a968 |
| permissions | -rw-r--r-- |
| 9 | 1 |
#encoding:UTF-8 |
2 |
||
3 |
""" Run these tests with 'python manage.py test text' """ |
|
4 |
||
5 |
from django.test import TestCase |
|
6 |
import unittest |
|
7 |
import lxml.etree |
|
8 |
from ldt.text.models import * |
|
9 |
from ldt.core.models import Owner |
|
10 |
from views import * |
|
| 16 | 11 |
import urllib |
| 9 | 12 |
import uuid |
13 |
import tempfile |
|
14 |
import datetime |
|
15 |
from django.contrib.auth.models import * |
|
16 |
from django.conf import settings |
|
17 |
from django.test.client import Client |
|
18 |
from ldt.text import VERSION_STR |
|
|
17
683ce4109c28
various corrections, especially on the model (and tags)
ymh <ymh.work@gmail.com>
parents:
16
diff
changeset
|
19 |
from django.db import transaction |
| 19 | 20 |
from django.contrib.auth.models import User |
21 |
import time |
|
| 21 | 22 |
import lucene |
23 |
from ldt.text import STORE, ANALYZER |
|
24 |
from ldt.text.utils import * |
|
| 9 | 25 |
|
26 |
||
27 |
# This test creates an annotation and checks that: |
|
28 |
# 1. the annotation was created in the database (by trying to access it through a 'get') |
|
29 |
# 2. the returned xml contains correct data |
|
30 |
class CreateTest(unittest.TestCase): |
|
31 |
def setUp(self): |
|
| 16 | 32 |
self.content = str('<iri><text-annotation><id>f2c1d1fa-629d-4520-a3d2-955b4f2582c0</id><uri>http://www.leezam.com/pub/epub/123456!/OPS/chapter2.xhtml#pos=56,168</uri><tags><tag>tag1</tag><tag>tag2</tag></tags><content><color>#AAAAAA</color><description><![CDATA[texte de description]]></description><title><![CDATA[titre de l\'annotation]]></title><text><![CDATA[texte selectionne lors de la creation de l\'annotation]]></text></content><meta><contributor>oaubert</contributor><contributor-id>79cd0532-1dda-4130-b351-6a181130a7c9</contributor-id><created>2010-09-06 12:33:53.417550</created><creator>oaubert</creator><creator-id>79cd0532-1dda-4130-b351-6a181130a7c9</creator-id><modified>2010-09-06 12:33:53.420459</modified></meta></text-annotation></iri>') |
| 9 | 33 |
self.c = Client() |
|
17
683ce4109c28
various corrections, especially on the model (and tags)
ymh <ymh.work@gmail.com>
parents:
16
diff
changeset
|
34 |
self.annot = Annotation(external_id=u'd2c1d1fa-629d-4520-a3d2-955b4f2582c0', uri=u'http://iri.blabla', tags=u"tag1,tag2", title=u'montitre', description=u'madesc', text=u'letexteselectionne', color=u'#AAAAAA', creator=u'wakimd', contributor=u'wakimd', creation_date=u'2010-09-06 12:33:53.417550', update_date=u'2010-09-06 12:33:53.417550') |
| 9 | 35 |
self.annot.save() |
36 |
def tearDown(self): |
|
|
17
683ce4109c28
various corrections, especially on the model (and tags)
ymh <ymh.work@gmail.com>
parents:
16
diff
changeset
|
37 |
transaction.rollback() |
| 9 | 38 |
annotlist=Annotation.objects.all() |
39 |
for annot in annotlist: |
|
40 |
annot.delete() |
|
41 |
||
42 |
def test_create_annotation(self): |
|
43 |
response = self.c.post('/api/'+ VERSION_STR +'/text/create/', {'content':self.content}) |
|
| 16 | 44 |
#self.assertEqual(response.content, " ") |
| 9 | 45 |
self.annot1 = lxml.etree.fromstring(response.content) |
46 |
self.assertEqual(self.annot1.xpath("/iri/text-annotation/id/text()")[0],"f2c1d1fa-629d-4520-a3d2-955b4f2582c0") |
|
47 |
self.assertEqual(self.annot1.xpath("/iri/text-annotation/content")[0].tag,"content") |
|
|
17
683ce4109c28
various corrections, especially on the model (and tags)
ymh <ymh.work@gmail.com>
parents:
16
diff
changeset
|
48 |
self.assertEqual(self.annot1.xpath("/iri/text-annotation/tags/tag/text()")[0],u"tag1") |
| 9 | 49 |
self.assertEqual(self.annot1.xpath("/iri/text-annotation/content/text/text()")[0],u"texte selectionne lors de la creation de l\'annotation") |
|
17
683ce4109c28
various corrections, especially on the model (and tags)
ymh <ymh.work@gmail.com>
parents:
16
diff
changeset
|
50 |
#self.assertEqual(self.annot1.xpath("/iri/text-annotation/meta/created/text()")[0],"2010-09-06 12:33:53.417550") |
| 16 | 51 |
response2 = self.c.get('/api/'+ VERSION_STR +'/text/get/', {'id':'f2c1d1fa-629d-4520-a3d2-955b4f2582c0'}) |
52 |
annot2 = lxml.etree.fromstring(response.content) |
|
53 |
self.assertEqual(annot2.xpath("/iri/text-annotation/uri/text()")[0], "http://www.leezam.com/pub/epub/123456!/OPS/chapter2.xhtml#pos=56,168") |
|
| 9 | 54 |
|
| 16 | 55 |
def test_error_create(self): |
56 |
content = '<iri><text-annotation><id>d2c1d1fa-629d-4520-a3d2-955b4f2582c0</id><uri>http://www.leezam.com/pub/epub/123456!/OPS/chapter2.xhtml#pos=56,168</uri><tags><tag>tag1</tag><tag>tag2</tag></tags><content><color>#AAAAAA</color><description><![CDATA[texte de description]]></description><title><![CDATA[titre de l\'annotation]]></title><text><![CDATA[texte selectionne lors de la creation de l\'annotation]]></text></content><meta><contributor>oaubert</contributor><contributor-id>79cd0532-1dda-4130-b351-6a181130a7c9</contributor-id><created>2010-09-06 12:33:53.417550</created><creator>oaubert</creator><creator-id>79cd0532-1dda-4130-b351-6a181130a7c9</creator-id><modified>2010-09-06 12:33:53.420459</modified></meta></text-annotation></iri>' |
|
57 |
response = self.c.post('/api/'+ VERSION_STR +'/text/create/', {'content':content}) |
|
58 |
self.assertEqual(response.status_code, 409) |
|
| 9 | 59 |
|
60 |
||
61 |
# This test creates an annotation, then gets it, and checks that the returned xml contains correct data |
|
62 |
class GetTest(unittest.TestCase): |
|
63 |
def setUp(self): |
|
|
17
683ce4109c28
various corrections, especially on the model (and tags)
ymh <ymh.work@gmail.com>
parents:
16
diff
changeset
|
64 |
self.annotation = Annotation(external_id="d2c1d1fa-629d-4520-a3d2-955b4f2582c0", tags=u"tag1 ,tag2 , tag3", title="titre de l\'annotation",text="texte selectionne lors de la creation de l\'annotation",color="#AAAAAA", creation_date="2010-09-06 12:33:53.417550", update_date="2010-09-06 12:33:53.420459") |
| 9 | 65 |
self.annotation.save() |
66 |
self.c = Client() |
|
67 |
def tearDown(self): |
|
68 |
annotlist=Annotation.objects.all() |
|
69 |
for annot in annotlist: |
|
70 |
annot.delete() |
|
71 |
||
72 |
def test_get_annotation(self): |
|
73 |
response = self.c.get('/api/'+ VERSION_STR +'/text/get/', {'id':'d2c1d1fa-629d-4520-a3d2-955b4f2582c0'}) |
|
|
17
683ce4109c28
various corrections, especially on the model (and tags)
ymh <ymh.work@gmail.com>
parents:
16
diff
changeset
|
74 |
print response |
| 9 | 75 |
self.annot1 = lxml.etree.fromstring(response.content) |
76 |
self.assertEqual(self.annot1.xpath("/iri/text-annotation/id/text()")[0],self.annotation.external_id) |
|
|
17
683ce4109c28
various corrections, especially on the model (and tags)
ymh <ymh.work@gmail.com>
parents:
16
diff
changeset
|
77 |
self.assertEqual(self.annot1.xpath("/iri/text-annotation/tags/tag/text()")[1], "tag2") |
| 9 | 78 |
self.assertEqual(self.annot1.xpath("/iri/text-annotation/content/color/text()")[0],self.annotation.color) |
79 |
self.assertEqual(self.annot1.xpath("/iri/text-annotation/meta/created/text()")[0], str(self.annotation.creation_date)) |
|
80 |
||
| 10 | 81 |
def test_error_get(self): |
82 |
response = self.c.get('/api/'+ VERSION_STR +'/text/get/', {'id':'2'}) |
|
83 |
self.assertEqual(response.status_code,404) |
|
| 9 | 84 |
|
85 |
||
86 |
class FilterTest(unittest.TestCase): |
|
87 |
def setUp(self): |
|
88 |
self.annotation = Annotation(external_id="k2c1d1fa-629d-4520-a3d2-955b4f2582c0",title="titre de l\'annotation",text="texte selectionne lors de la creation de l\'annotation",color="#AAAAAA", uri="http://www.leezam.com/pub/epub/123456!/OPS/chapter2.xhtml#pos=56,168", creator="wakimd") |
|
89 |
self.annotation.save() |
|
90 |
self.annotation2 = Annotation(external_id="l2c1d1fa-629d-4520-a3d2-955b4f2582c0",title="titre de l\'annotation2",text="texte selectionne lors de la creation de l\'annotation2",color="#BBBBBB", uri="http://www.leezam.com/pub/epub/123456!/OPS/chapter2.xhtml#pos=56,168", creator="wakimd") |
|
91 |
self.annotation2.save() |
|
92 |
self.annotation3 = Annotation(external_id="m2c1d1fa-629d-4520-a3d2-955b4f2582c0", title="titre3", text="texte3", color="#CCCCCC", uri="http://blabla", creator="wakimd") |
|
93 |
self.annotation3.save() |
|
94 |
self.c = Client() |
|
95 |
def tearDown(self): |
|
96 |
annotlist=Annotation.objects.all() |
|
97 |
for annot in annotlist: |
|
98 |
annot.delete() |
|
99 |
||
100 |
def test_filter_annotation_creator_limit(self): |
|
101 |
user = 'wakimd' |
|
102 |
uri = "http://www.leezam.com/pub/epub/123456!/OPS/chapter2.xhtml#pos=56,168" |
|
103 |
limit= 1 |
|
104 |
response = self.c.get('/api/'+ VERSION_STR +'/text/filter/', {'uri':uri,'creator':user,'limit':limit}) |
|
105 |
doc = lxml.etree.fromstring(response.content) |
|
106 |
cpt = 0 |
|
107 |
for elem in doc.xpath("/iri/text-annotation"): |
|
108 |
cpt = cpt + 1 |
|
109 |
if limit is not None: |
|
110 |
self.assertEqual(cpt,limit) |
|
111 |
for elem in doc.xpath("/iri/text-annotation/meta/creator/text()"): |
|
112 |
self.assertEqual(elem,user) |
|
113 |
for elem in doc.xpath("/iri/text-annotation/uri/text()"): |
|
114 |
self.assertEqual(elem[:57],"http://www.leezam.com/pub/epub/123456!/OPS/chapter2.xhtml") |
|
115 |
||
116 |
def test_filter_annotation_uri(self): |
|
117 |
uri = "http://www.leezam.com/pub/epub/123456!/OPS/chapter2.xhtml#pos=56,168" |
|
118 |
response = self.c.get('/api/'+ VERSION_STR +'/text/filter/', {'uri':uri}) |
|
119 |
doc = lxml.etree.fromstring(response.content) |
|
120 |
for elem in doc.xpath("/iri/text-annotation/uri/text()"): |
|
121 |
self.assertEqual(elem[:57],"http://www.leezam.com/pub/epub/123456!/OPS/chapter2.xhtml") |
|
122 |
||
123 |
def test_filter_annotation_filter(self): |
|
124 |
uri = "http://www.leezam.com/pub/epub/123456!/OPS/chapter2.xhtml#pos=56,168" |
|
125 |
filter = 'lors' |
|
126 |
limit = None |
|
| 21 | 127 |
response = self.c.get('/api/'+ VERSION_STR +'/text/filter/', {'uri':uri,'filter':filter}) |
| 9 | 128 |
doc = lxml.etree.fromstring(response.content) |
129 |
for elem in doc.xpath("/iri/text-annotation/content/text/text()"): |
|
130 |
self.assertTrue('lors' in elem) |
|
|
17
683ce4109c28
various corrections, especially on the model (and tags)
ymh <ymh.work@gmail.com>
parents:
16
diff
changeset
|
131 |
#for elem in doc.xpath("/iri/text-annotation/meta/creator/text()"): |
|
683ce4109c28
various corrections, especially on the model (and tags)
ymh <ymh.work@gmail.com>
parents:
16
diff
changeset
|
132 |
# self.assertEqual(elem,user) |
| 9 | 133 |
|
134 |
||
135 |
# This test creates an annotation, then deletes it, and checks that: |
|
136 |
# 1. the annotation doesn't exist anymore in the database (by trying to access it through a 'get') |
|
137 |
# 2. the returned xml contains no data |
|
138 |
class DeleteTest(unittest.TestCase): |
|
139 |
def setUp(self): |
|
140 |
self.annotation = Annotation(external_id="d2c1d1fa-629d-4520-a3d2-955b4f2582c0",title="titre de l\'annotation",text="texte selectionne lors de la creation de l\'annotation",color="#AAAAAA", creation_date="2010-09-06T12:33:53.417550", update_date="2010-09-06T12:33:53.420459") |
|
141 |
self.annotation.save() |
|
| 21 | 142 |
self.c = Client() |
| 9 | 143 |
def tearDown(self): |
144 |
annotlist=Annotation.objects.all() |
|
145 |
for annot in annotlist: |
|
146 |
annot.delete() |
|
| 21 | 147 |
|
| 9 | 148 |
|
149 |
def test_delete_annotation(self): |
|
| 16 | 150 |
id = urllib.urlencode({'id':'d2c1d1fa-629d-4520-a3d2-955b4f2582c0'}) |
151 |
f = urllib.urlopen("http://127.0.0.1:8000/api/1.0/text/delete/", id) |
|
| 9 | 152 |
response = self.c.post('/api/'+ VERSION_STR +'/text/delete/', {'id':'d2c1d1fa-629d-4520-a3d2-955b4f2582c0'}) |
| 10 | 153 |
response2 = self.c.get('/ldt/get/', {'id':'d2c1d1fa-629d-4520-a3d2-955b4f2582c0'}) |
| 9 | 154 |
doc = lxml.etree.fromstring(response.content) |
155 |
self.assertEqual(doc.xpath("/iri/text-annotation/id/text()"),[]) |
|
156 |
self.assertEqual(doc.xpath("/iri/text-annotation/tags/tag/text()"), []) |
|
157 |
self.assertEqual(doc.xpath("/iri/text-annotation/content/color/text()"),[]) |
|
158 |
self.assertEqual(doc.xpath("/iri/text-annotation/meta/creator/text()"),[]) |
|
| 21 | 159 |
self.assertEqual(response2.status_code, 404) |
160 |
||
| 9 | 161 |
|
| 10 | 162 |
def test_error_delete(self): |
163 |
response = self.c.post('/api/'+ VERSION_STR +'/text/ldt/delete/', {'id':'1'}) |
|
164 |
self.assertEqual(response.status_code,404) |
|
| 9 | 165 |
|
166 |
||
167 |
# This test creates an annotation, then updates it with new content, and checks that the returned xml contains the updated data |
|
168 |
class UpdateTest(unittest.TestCase): |
|
169 |
def setUp(self): |
|
|
17
683ce4109c28
various corrections, especially on the model (and tags)
ymh <ymh.work@gmail.com>
parents:
16
diff
changeset
|
170 |
self.annotation = Annotation(external_id="d2c1d1fa-629d-4520-a3d2-955b4f2582c0", tags=u"tag1, mytag",title="titre de l\'annotation",text="texte selectionne lors de la creation de l\'annotation",color="#AAAAAA", creation_date="2010-09-06T12:33:53.417550", update_date="2010-09-06T12:33:53.420459") |
| 9 | 171 |
self.annotation.save() |
172 |
self.c = Client() |
|
173 |
def tearDown(self): |
|
174 |
annotlist=Annotation.objects.all() |
|
175 |
for annot in annotlist: |
|
176 |
annot.delete() |
|
177 |
||
178 |
def test_update_annotation(self): |
|
| 16 | 179 |
content = '<iri><text-annotation><id></id><uri></uri><tags><tag>tag1</tag><tag>tag2new</tag><tag>tag3</tag></tags><content><color>#DDDDDD</color><description><![CDATA[texte de description update]]></description><title></title><text><![CDATA[texte selectionne a nouveau lors de la creation de l\'annotation]]></text></content><meta><contributor>oaubert</contributor><contributor-id>80cd0532-1dda-4130-b351-6a181130a7c9</contributor-id><created></created><creator></creator><creator-id></creator-id><modified>2010-11-06 12:33:53.420459</modified></meta></text-annotation></iri>' |
180 |
response = self.c.post('/api/'+ VERSION_STR +'/text/update/', {'content':content,'id':'d2c1d1fa-629d-4520-a3d2-955b4f2582c0'}) |
|
| 9 | 181 |
doc = lxml.etree.fromstring(response.content) |
| 16 | 182 |
#self.assertEqual(lxml.etree.tostring(doc), " ") |
183 |
self.assertEqual(doc.xpath("/iri/text-annotation/id/text()")[0],"d2c1d1fa-629d-4520-a3d2-955b4f2582c0") |
|
|
17
683ce4109c28
various corrections, especially on the model (and tags)
ymh <ymh.work@gmail.com>
parents:
16
diff
changeset
|
184 |
self.assertEqual(doc.xpath("/iri/text-annotation/tags/tag/text()")[1], "tag2new") |
| 9 | 185 |
self.assertEqual(doc.xpath("/iri/text-annotation/content/color/text()")[0],"#DDDDDD") |
186 |
||
| 10 | 187 |
def test_error_update(self): |
| 16 | 188 |
content = '<iri><text-annotation><id>d2c1d1fa-629d-4520-a3d2-955b4f2582c0</id><uri>http://www.leezam.com/pub/epub/123456!/OPS/chapter2.xhtml#pos=56,168</uri><tags><tag>tag1</tag><tag>tag2</tag></tags><content><color>#AAAAAA</color><description><![CDATA[texte de description]]></description><title><![CDATA[titre de l\'annotation]]></title><text><![CDATA[texte selectionne lors de la creation de l\'annotation]]></text></content><meta><contributor>oaubert</contributor><contributor-id>79cd0532-1dda-4130-b351-6a181130a7c9</contributor-id><created>2010-09-06 12:33:53.417550</created><creator>oaubert</creator><creator-id>79cd0532-1dda-4130-b351-6a181130a7c9</creator-id><modified>2010-09-06 12:33:53.420459</modified></meta></text-annotation></iri>' |
| 10 | 189 |
response = self.c.post('/api/'+ VERSION_STR +'/text/update/', {'content':content,'id':'1'}) |
190 |
self.assertEqual(response.status_code,404) |
|
191 |
||
| 9 | 192 |
|
| 16 | 193 |
class OnServerGlobalTest(unittest.TestCase): |
194 |
def setUp(self): |
|
195 |
self.content = urllib.urlencode({'content':'<iri><text-annotation><id>mypersonnalid</id><uri>http://www.leezam.com/pub/epub/123456!/OPS/chapter2.xhtml#pos=56,168</uri><tags><tag>tag1</tag><tag>tag2</tag></tags><content><color>#AAAAAA</color><description><![CDATA[texte de description]]></description><title><![CDATA[titre de l\'annotation]]></title><text><![CDATA[texte selectionne lors de la creation de l\'annotation]]></text></content><meta><contributor>oaubert</contributor><contributor-id>79cd0532-1dda-4130-b351-6a181130a7c9</contributor-id><created>2010-09-06 12:33:53.417550</created><creator>oaubert</creator><creator-id>79cd0532-1dda-4130-b351-6a181130a7c9</creator-id><modified>2010-09-06 12:33:53.420459</modified></meta></text-annotation></iri>'}) |
|
196 |
self.content2 = urllib.urlencode({'content':'<iri><text-annotation><id>mypersonnalid2</id><uri>http://www.leezam.com/pub/epub/123456!/OPS/chapter2.xhtml#pos=56,168</uri><tags><tag>tag1</tag><tag>tag2</tag></tags><content><color>#BBBBBB</color><description><![CDATA[texte de description2]]></description><title><![CDATA[titre de l\'annotation2]]></title><text><![CDATA[texte selectionne lors de la creation de l\'annotation2]]></text></content><meta><contributor>wakimd</contributor><contributor-id>79cd0532-1dda-4130-b351-6a181130a7c9</contributor-id><created>2010-09-06 12:33:53.417550</created><creator>oaubert</creator><creator-id>79cd0532-1dda-4130-b351-6a181130a7c9</creator-id><modified>2010-09-06 12:33:53.420459</modified></meta></text-annotation></iri>'}) |
|
197 |
self.id = urllib.urlencode({"id":"mypersonnalid"}) |
|
198 |
self.id2 = urllib.urlencode({"id":"mypersonnalid2"}) |
|
199 |
self.uri = urllib.urlencode({"uri":"http://www.leezam.com/pub/epub/123456!/OPS/chapter2.xhtml#pos=56,168"}) |
|
200 |
self.filt1 = urllib.urlencode({"uri":"http://www.leezam.com/pub/epub/123456!/OPS/chapter2.xhtml#pos=56,168", "creator":"","limit":"","filter":""}) |
|
201 |
self.filt2 = urllib.urlencode({"uri":"http://www.leezam.com/pub/epub/123456!/OPS/chapter2.xhtml#pos=56,168","creator":"wakimd","limit":"","filter":""}) |
|
202 |
self.up = urllib.urlencode({'content':'<iri><text-annotation><id></id><uri></uri><tags><tag>tag1</tag><tag>tag2new</tag><tag>tag3</tag></tags><content><color>#DDDDDD</color><description><![CDATA[texte de description update]]></description><title></title><text><![CDATA[texte selectionne a nouveau lors de la creation de l\'annotation]]></text></content><meta><contributor>oaubert</contributor><contributor-id>80cd0532-1dda-4130-b351-6a181130a7c9</contributor-id><created></created><creator></creator><creator-id></creator-id><modified>2010-11-06 12:33:53.420459</modified></meta></text-annotation></iri>','id':'mypersonnalid'}) |
|
| 21 | 203 |
self.LS = LdtSearch() |
| 16 | 204 |
|
205 |
def test_everything(self): |
|
206 |
creation = urllib.urlopen("http://127.0.0.1:8000/api/"+VERSION_STR+"/text/create/", self.content) |
|
207 |
creation2 = urllib.urlopen("http://127.0.0.1:8000/api/"+VERSION_STR+"/text/create/", self.content2) |
|
| 21 | 208 |
|
209 |
res1 = self.LS.query("title","titre de l'annotation") |
|
210 |
self.assertEqual(len(res1),1) |
|
211 |
res2 = self.LS.query("title","titre de l'annotation2") |
|
212 |
self.assertEqual(len(res2),1) |
|
213 |
||
| 16 | 214 |
|
215 |
get = urllib.urlopen("http://127.0.0.1:8000/api/"+VERSION_STR+"/text/get/?%s" % self.id) |
|
216 |
||
217 |
update = urllib.urlopen("http://127.0.0.1:8000/api/"+VERSION_STR+"/text/update/", self.up) |
|
218 |
||
| 21 | 219 |
res3 = self.LS.query("abstract","texte de description update") |
220 |
self.assertEqual(len(res3),1) |
|
221 |
||
222 |
filt1 = urllib.urlopen("http://127.0.0.1:8000/api/"+VERSION_STR+"/text/filter/?%s" % self.uri) |
|
| 16 | 223 |
filt2 = urllib.urlopen("http://127.0.0.1:8000/api/"+VERSION_STR+"/text/filter/?uri=http://www.leezam.com/pub/epub/123456!/OPS/chapter2.xhtml#pos=56,168?creator=wakimd") |
| 21 | 224 |
|
| 16 | 225 |
delete = urllib.urlopen("http://127.0.0.1:8000/api/"+VERSION_STR+"/text/delete/", self.id) |
226 |
delete = urllib.urlopen("http://127.0.0.1:8000/api/"+VERSION_STR+"/text/delete/", self.id2) |
|
| 19 | 227 |
|
| 21 | 228 |
res4 = self.LS.query("title","titre de l'annotation") |
229 |
self.assertEqual(len(res4),0) |
|
230 |
res5 = self.LS.query("title","titre de l'annotation2") |
|
231 |
self.assertEqual(len(res5),0) |
|
| 19 | 232 |
|
233 |
||
234 |