added test_mode() method

no idea how to test the method for "non test mode" since running a test implies being in a zope test runner mode..