Skip to content

Commit

Permalink
Fix naming to follow naming conventions, leftovers from copy/paste code
Browse files Browse the repository at this point in the history
  • Loading branch information
sneridagh committed Jan 17, 2018
1 parent 75231c0 commit c12d66b
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/plone/restapi/services/configure.zcml
Expand Up @@ -27,6 +27,6 @@
<include package=".workflow"/>
<include package=".multilingual"
zcml:condition="have plone-5"/>
<include package=".contact"
<include package=".email_notification"
zcml:condition="have plone-5"/>
</configure>
Expand Up @@ -7,7 +7,7 @@
method="POST"
name="@email-notification"
for="Products.CMFCore.interfaces.ISiteRoot"
factory=".post.ContactPost"
factory=".post.EmailNotificationPost"
permission="zope2.View"
/>

Expand Down
Expand Up @@ -7,7 +7,7 @@
import plone


class ContactPost(Service):
class EmailNotificationPost(Service):

def reply(self):
data = json_body(self.request)
Expand All @@ -23,9 +23,9 @@ def reply(self):
type='BadRequest',
message='Missing from or message parameters'))

ctrlOverview = getMultiAdapter((self.context, self.request),
name='overview-controlpanel')
if ctrlOverview.mailhost_warning():
overview_controlpanel = getMultiAdapter((self.context, self.request),
name='overview-controlpanel')
if overview_controlpanel.mailhost_warning():
self.request.response.setStatus(400)
return dict(error=dict(
type='BadRequest',
Expand Down
Expand Up @@ -21,8 +21,8 @@
PLONE5 = True


@unittest.skipIf(not PLONE5, 'Just Plone 5 currently.')
class TestUsersEndpoint(unittest.TestCase):
@unittest.skipIf(not PLONE5, 'email notification not implemented for Plone < 5.') # noqa
class EmailNotificationEndpoint(unittest.TestCase):

layer = PLONE_RESTAPI_DX_FUNCTIONAL_TESTING

Expand Down

0 comments on commit c12d66b

Please sign in to comment.