Skip to content

Commit

Permalink
Avoid pyflakes warnings for long package names.
Browse files Browse the repository at this point in the history
Several lines in test_setup.py are too long when we generate
a package with name test.nested.plone_addon, like we do in the tests.
  • Loading branch information
mauritsvanrees committed Sep 17, 2015
1 parent d78b064 commit ef33c87
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
3 changes: 2 additions & 1 deletion CHANGES.rst
Expand Up @@ -4,7 +4,8 @@ Changelog
1.0 (unreleased)
----------------

- Nothing changed yet.
- Avoid pyflakes warnings for long package names.
[maurits]


1.0b1 (2015-09-17)
Expand Down
Expand Up @@ -17,12 +17,14 @@ class TestSetup(unittest.TestCase):
self.installer = api.portal.get_tool('portal_quickinstaller')

def test_product_installed(self):
"""Test if {{{ package.dottedname }}} is installed with portal_quickinstaller."""
self.assertTrue(self.installer.isProductInstalled('{{{ package.dottedname }}}'))
"""Test if {{{ package.dottedname }}} is installed."""
self.assertTrue(self.installer.isProductInstalled(
'{{{ package.dottedname }}}'))

def test_browserlayer(self):
"""Test that I{{{ package.browserlayer }}} is registered."""
from {{{ package.dottedname }}}.interfaces import I{{{ package.browserlayer }}}
from {{{ package.dottedname }}}.interfaces import (
I{{{ package.browserlayer }}})
from plone.browserlayer import utils
self.assertIn(I{{{ package.browserlayer }}}, utils.registered_layers())

Expand All @@ -38,7 +40,8 @@ class TestUninstall(unittest.TestCase):

def test_product_uninstalled(self):
"""Test if {{{ package.dottedname }}} is cleanly uninstalled."""
self.assertFalse(self.installer.isProductInstalled('{{{ package.dottedname }}}'))
self.assertFalse(self.installer.isProductInstalled(
'{{{ package.dottedname }}}'))
{{% if plone.is_plone5 %}}

def test_browserlayer_removed(self):
Expand Down

0 comments on commit ef33c87

Please sign in to comment.