added test_mode() method
Merge pull request #140 from plone/issue_125

added test_mode() method