Skip to content

Commit

Permalink
Refactor test to avoid weird failure on Plone 4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
hvelarde committed Aug 30, 2013
1 parent e60de61 commit a7cac67
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/collective/cover/tests/test_upgrades.py
Expand Up @@ -192,14 +192,16 @@ def test_issue_262(self):

def test_tinymce_linkables(self):
# default installation includes Cover as linkable
self.assertIn('collective.cover.content', self.tinymce.linkable.split('\n'))

# set linkable as on version 5 and make sure cover is not linkable any more
linkables = self.tinymce.linkable.split('\n')
linkables.pop()
self.assertIn(u'collective.cover.content', linkables)

# remove cover from linkables to simulate version 4
linkables.remove(u'collective.cover.content')
self.tinymce.linkable = '\n'.join(linkables)
self.assertNotIn('collective.cover.content', self.tinymce.linkable.split('\n'))
linkables = self.tinymce.linkable.split('\n')
self.assertNotIn(u'collective.cover.content', linkables)

# and now run the upgrade step to check that worked
tinymce_linkable(self.portal)
self.assertIn('collective.cover.content', self.tinymce.linkable.split('\n'))
linkables = self.tinymce.linkable.split('\n')
self.assertIn(u'collective.cover.content', linkables)

0 comments on commit a7cac67

Please sign in to comment.