Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
hvelarde committed Mar 9, 2017
1 parent 0b43b48 commit f0f0d6e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions sc/social/like/tests/test_upgrades.py
Expand Up @@ -225,15 +225,15 @@ def test_add_fbshowlikes_record(self):
step = self.get_upgrade_step(title)
assert step is not None

# remove registry settings
# simulate state on previous version
from plone.registry.interfaces import IRegistry
from sc.social.like.config import PROJECTNAME
from sc.social.like.interfaces import ISocialLikeSettings
from zope.component import getUtility
profile = 'profile-{0}:uninstall'.format(PROJECTNAME)
setup_tool = api.portal.get_tool(name='portal_setup')
setup_tool.runImportStepFromProfile(profile, 'plone.app.registry')
registry = getUtility(IRegistry)
record = ISocialLikeSettings.__identifier__ + '.fbshowlikes'
del registry.records[record]
assert record not in registry

with self.assertRaises(KeyError):
registry.forInterface(ISocialLikeSettings)

Expand Down

0 comments on commit f0f0d6e

Please sign in to comment.