You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2022/11/11 16:42:08 UTC
[allura] branch master updated: fix weird HTTPError issue; details at https://github.com/agronholm/exceptiongroup/issues/39
This is an automated email from the ASF dual-hosted git repository.
brondsem pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/allura.git
The following commit(s) were added to refs/heads/master by this push:
new df1d579eb fix weird HTTPError issue; details at https://github.com/agronholm/exceptiongroup/issues/39
df1d579eb is described below
commit df1d579ebbb8adcc52918a7362a8e486458dba87
Author: Dave Brondsema <db...@slashdotmedia.com>
AuthorDate: Fri Nov 11 11:41:30 2022 -0500
fix weird HTTPError issue; details at https://github.com/agronholm/exceptiongroup/issues/39
---
Allura/allura/tests/test_helpers.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/Allura/allura/tests/test_helpers.py b/Allura/allura/tests/test_helpers.py
index 045d9a4e0..c686a9e32 100644
--- a/Allura/allura/tests/test_helpers.py
+++ b/Allura/allura/tests/test_helpers.py
@@ -15,6 +15,7 @@
# specific language governing permissions and limitations
# under the License.
+import io
from unittest import TestCase, skipIf
from os import path
from datetime import datetime, timedelta
@@ -487,7 +488,7 @@ class TestUrlOpen(TestCase):
from six.moves.urllib.error import HTTPError
def side_effect(url, timeout=None):
- raise HTTPError('url', 408, 'timeout', None, None)
+ raise HTTPError('url', 408, 'timeout', None, io.BytesIO())
urlopen.side_effect = side_effect
self.assertRaises(HTTPError, h.urlopen, 'myurl')
@@ -498,7 +499,7 @@ class TestUrlOpen(TestCase):
from six.moves.urllib.error import HTTPError
def side_effect(url, timeout=None):
- raise HTTPError('url', 404, 'timeout', None, None)
+ raise HTTPError('url', 404, 'timeout', None, io.BytesIO())
urlopen.side_effect = side_effect
self.assertRaises(HTTPError, h.urlopen, 'myurl')