Commit 83a7e9df authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

raise RuntimeError instead of Unauthorized for functional tests.

so that we will not have HTTP authentication dialog in case of  Unauthorized exception to prevent blocking in functional tests.
parent cf53db45
......@@ -35,6 +35,7 @@ import re
import subprocess
import shutil
import transaction
from ZPublished.HTTPResponse import HTTPResponse
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase, \
_getConversionServerDict
......@@ -410,3 +411,10 @@ class ERP5TypeFunctionalTestCase(ERP5TypeTestCase):
self.logMessage("-" * 79)
self.assertEquals([], error_title_list, '\n'.join(error_title_list))
# monkey patch HTTPResponse._unauthorized so that we will not have HTTP
# authentication dialog in case of Unauthorized exception to prevent
# blocking in functional tests.
def _unauthorized(self):
raise RuntimeError, 'Unauthorized exception happens.'
HTTPResponse._unauthorized = _unauthorized
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment