Ignore currently unused code from code coverage. Overall code coverage is up to 95%.

svn path=/plone.app.discussion/trunk/; revision=40497
This commit is contained in:
Timo Stollenwerk 2010-10-03 19:54:59 +00:00
parent 6d92d1383c
commit b06ba43a75

View File

@ -40,7 +40,7 @@ try:
from Products.CMFCore.CMFCatalogAware import CatalogAware from Products.CMFCore.CMFCatalogAware import CatalogAware
from Products.CMFCore.CMFCatalogAware import WorkflowAware from Products.CMFCore.CMFCatalogAware import WorkflowAware
PLONE_4 = True PLONE_4 = True
except: except: # pragma: no cover
# Plone 3: # Plone 3:
# Dummy imports to make Comment class happy # Dummy imports to make Comment class happy
from OFS.Traversable import Traversable as CatalogAware from OFS.Traversable import Traversable as CatalogAware
@ -147,13 +147,13 @@ class Comment(CatalogAware, WorkflowAware, DynamicType, Traversable,
# CMF's event handlers assume any IDynamicType has these :( # CMF's event handlers assume any IDynamicType has these :(
def opaqueItems(self): def opaqueItems(self): # pragma: no cover
return [] return []
def opaqueIds(self): def opaqueIds(self): # pragma: no cover
return [] return []
def opaqueValues(self): def opaqueValues(self): # pragma: no cover
return [] return []
CommentFactory = Factory(Comment) CommentFactory = Factory(Comment)
@ -182,7 +182,9 @@ def notify_content_object_deleted(obj, event):
for comment in conversation.getComments(): for comment in conversation.getComments():
del conversation[comment.id] del conversation[comment.id]
def notify_user(obj, event): # XXX: This method is not enabled yet. Remove "pragma: no cover" as soon as the
# commented out notify user code has been removed.
def notify_user(obj, event): # pragma: no cover
"""Tell users when a comment has been added. """Tell users when a comment has been added.
This method composes and sends emails to all users that have added a This method composes and sends emails to all users that have added a
@ -274,4 +276,8 @@ def notify_moderator(obj, event):
if PLONE_4: if PLONE_4:
mail_host.send(message, mto, sender, subject, charset='utf-8') mail_host.send(message, mto, sender, subject, charset='utf-8')
else: else:
mail_host.secureSend(message, mto, sender, subject=subject, charset='utf-8') mail_host.secureSend(message,
mto,
sender,
subject=subject,
charset='utf-8') # pragma: no cover