Refactor tests

Use assertIn and assertNotIn where possible.
Merge branch 'master' into plone-api