Skip to content

Commit

Permalink
add test on browserlayer
Browse files Browse the repository at this point in the history
  • Loading branch information
toutpt committed Apr 25, 2012
1 parent 6afe2c9 commit 056351f
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 3 deletions.
8 changes: 7 additions & 1 deletion buildout.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,14 @@ extends =
package-name = collective.linguaanalytics
package-extras = [tests]

parts+=omelette
parts+=omelette testxml

[omelette]
recipe=collective.recipe.omelette
eggs=${instance:eggs}

[testxml]
recipe = collective.xmltestreport
eggs =
${test:eggs}
defaults = ['--auto-color', '--auto-progress', '--xml', '-s', '${buildout:package-name}']
20 changes: 18 additions & 2 deletions collective/linguaanalytics/tests/test_setup.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,29 @@
import unittest2 as unittest
from collective.linguaanalytics.tests import base
from plone.browserlayer import utils

class TestSetup(base.IntegrationTestCase):
"""We tests the setup (install) of the addons. You should check all
stuff in profile are well activated (browserlayer, js, content types, ...)
"""

def test_xxx(self):
self.assertTrue(False)
def test_browserlayer(self):
from collective.linguaanalytics.interfaces import ILayer
layers = utils.registered_layers()
self.assertIn(ILayer, layers)

class TestUninstall(base.IntegrationTestCase):
"""Test if the addon uninstall well"""

def setUp(self):
super(TestUninstall, self).setUp()
qi = self.portal['portal_quickinstaller']
qi.uninstallProducts(products=['collective.linguaanalytics'])

def test_uninstall_browserlayer(self):
from collective.linguaanalytics.interfaces import ILayer
layers = utils.registered_layers()
self.assertNotIn(ILayer, layers)

def test_suite():
return unittest.defaultTestLoader.loadTestsFromName(__name__)

0 comments on commit 056351f

Please sign in to comment.