Skip to content

Commit

Permalink
Fix behavior sub-template and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MrTango committed Mar 8, 2019
1 parent 869a662 commit 2ddcb95
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ from plone.autoform.interfaces import IFormFieldProvider
from plone.dexterity.interfaces import IDexterityContent
from plone.supermodel import model
from zope.component import adapter
from zope.interface import Interface
from zope.interface import implementer
from zope.interface import provider


class I{{{behavior_name_klass}}}Marker:
class I{{{behavior_name_klass}}}Marker(Interface):
pass

@provider(IFormFieldProvider)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
from {{{package.dottedname}}}.behaviors.{{{behavior_name_normalized}}} import I{{{ behavior_name_klass }}}
from {{{package.dottedname}}}.behaviors.{{{behavior_name_normalized}}} import I{{{ behavior_name_klass }}}Marker
from {{{package.dottedname}}}.testing import {{{package.uppercasename}}}_INTEGRATION_TESTING # noqa
from plone.app.testing import setRoles
from plone.app.testing import TEST_USER_ID
Expand All @@ -22,11 +22,5 @@ class {{{ behavior_name_klass }}}IntegrationTest(unittest.TestCase):
behavior = getUtility(IBehavior, '{{{ package.dottedname }}}.{{{ behavior_name_normalized }}}')
self.assertEqual(
behavior.marker,
I{{{ behavior_name_klass }}},
)
behavior_name = '{{{ package.dottedname }}}.behaviors.{{{ behavior_name_normalized }}}.I{{{ behavior_name_klass }}}'
behavior = getUtility(IBehavior, behavior_name)
self.assertEqual(
behavior.marker,
I{{{ behavior_name_klass }}},
I{{{ behavior_name_klass }}}Marker,
)

0 comments on commit 2ddcb95

Please sign in to comment.