Commit c996feb2 authored by Tres Seaver's avatar Tres Seaver

Collector #2136: Map ResourceLockedError to the correct response code.

parent 0ab7976f
......@@ -18,6 +18,8 @@ Zope Changes
Bugs fixed
- Collector #2136: Map ResourceLockedError to the correct response code.
- Collector #2016: DemoStorage couldn't wrap base storages without
an '_oid' attribute.
......
......@@ -97,6 +97,7 @@ for name in en:
status_codes['nameerror'] = 503
status_codes['keyerror'] = 503
status_codes['redirect'] = 300
status_codes['resourcelockederror'] = 423
start_of_header_search = re.compile('(<head[^>]*>)', re.IGNORECASE).search
......
......@@ -74,6 +74,12 @@ class HTTPResponseTests(unittest.TestCase):
response.appendHeader('XXX', 'foo')
self.assertEqual(response.headers.get('xxx'), 'bar,\n\tfoo')
def test_setStatus_ResourceLockedError(self):
response = self._makeOne()
from webdav.Lockable import ResourceLockedError
response.setStatus(ResourceLockedError)
self.assertEqual(response.status, 423)
def test_suite():
suite = unittest.TestSuite()
......
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