diff options
| author | Mark Sapiro | 2016-11-01 11:51:17 -0700 |
|---|---|---|
| committer | Mark Sapiro | 2016-11-01 11:51:17 -0700 |
| commit | 2adcc70b65749c8fe616ac61c93765aade75c783 (patch) | |
| tree | c3fcf0531d68f4f14ee59de1c911460b7ee3a56f /src/mailman/rest/tests/test_basic.py | |
| parent | c77e6918d80a5aeab557f9f171594c858ef926f5 (diff) | |
| parent | 366dc6517716b7c77c4b7a76559b1b6b5996fc8e (diff) | |
| download | mailman-2adcc70b65749c8fe616ac61c93765aade75c783.tar.gz mailman-2adcc70b65749c8fe616ac61c93765aade75c783.tar.zst mailman-2adcc70b65749c8fe616ac61c93765aade75c783.zip | |
Diffstat (limited to 'src/mailman/rest/tests/test_basic.py')
| -rw-r--r-- | src/mailman/rest/tests/test_basic.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mailman/rest/tests/test_basic.py b/src/mailman/rest/tests/test_basic.py index 64c60842c..23db57f8e 100644 --- a/src/mailman/rest/tests/test_basic.py +++ b/src/mailman/rest/tests/test_basic.py @@ -26,6 +26,7 @@ from mailman.app.lifecycle import create_list from mailman.database.transaction import transaction from mailman.testing.helpers import call_api from mailman.testing.layers import RESTLayer +from urllib.error import HTTPError class TestBasicREST(unittest.TestCase): @@ -45,3 +46,10 @@ class TestBasicREST(unittest.TestCase): # This fails with Falcon 0.2; passes with Falcon 0.3. self.assertEqual(self._mlist.description, 'A description with , to check stuff') + + def test_send_error(self): + # GL#288 working around Python bug #28548. The improperly encoded + # space in the URL breaks error reporting due to default HTTP/0.9. + with self.assertRaises(HTTPError) as cm: + call_api('http://localhost:9001/3.0/lists/test @example.com') + self.assertEqual(cm.exception.code, 400) |
