|
@@ -21,6 +21,7 @@ from tracim.tests import TestCalendar as BaseTestCalendar
|
21
|
21
|
from tracim.tests import not_raises
|
22
|
22
|
from tracim.model.auth import User
|
23
|
23
|
from tracim.model.data import Content
|
|
24
|
+from tracim.model.data import ContentRevisionRO
|
24
|
25
|
from tracim.model.data import Workspace
|
25
|
26
|
|
26
|
27
|
|
|
@@ -197,9 +198,11 @@ END:VCALENDAR
|
197
|
198
|
time.sleep(3) # Wait for be sure transaction commited in daemon
|
198
|
199
|
transaction.commit()
|
199
|
200
|
try:
|
200
|
|
- event = DBSession.query(Content).filter(
|
201
|
|
- Content.label == 'This is an event'
|
202
|
|
- ).one()
|
|
201
|
+ event = DBSession.query(Content) \
|
|
202
|
+ .filter(Content.label == 'This is an event') \
|
|
203
|
+ .filter(Content.owner_id == lawrence.user_id) \
|
|
204
|
+ .filter(Content.id == ContentRevisionRO.content_id) \
|
|
205
|
+ .one()
|
203
|
206
|
except NoResultFound:
|
204
|
207
|
ok_(False, 'Content record should exist for '
|
205
|
208
|
'"This is an event" label')
|