forked from pool/python-mailman-hyperkitty
Accepting request 932256 from devel:languages:python:mailman
OBS-URL: https://build.opensuse.org/request/show/932256 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-mailman-hyperkitty?expand=0&rev=3
This commit is contained in:
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:5dcec952c69fd42bfa25869a7dce662502cac5af1289e2c2d96dc3da5452d8d1
|
||||
size 20814
|
||||
3
mailman-hyperkitty-1.2.0.tar.gz
Normal file
3
mailman-hyperkitty-1.2.0.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:110071d4a5f7cff5afdd00073a2facfe284b3a3a62ba9210058c84e883db26da
|
||||
size 21794
|
||||
@@ -1,45 +0,0 @@
|
||||
diff --git a/mailman_hyperkitty/tests/test_archiver.py b/mailman_hyperkitty/tests/test_archiver.py
|
||||
index 3d8896b6bb80eb3fe0b3aaa78c1eb3ac67076c5d..8430e3e3c0a943021707a2a34b4c700eb0a9a053 100644
|
||||
--- a/mailman_hyperkitty/tests/test_archiver.py
|
||||
+++ b/mailman_hyperkitty/tests/test_archiver.py
|
||||
@@ -102,10 +102,10 @@ class ArchiverTestCase(TestCase):
|
||||
self.requests_patcher = patch("mailman_hyperkitty.requests")
|
||||
self.requests = self.requests_patcher.start()
|
||||
self.fake_response = None
|
||||
- self.requests.get.side_effect = \
|
||||
- lambda url, *a, **kw: self.fake_response
|
||||
- self.requests.post.side_effect = \
|
||||
- lambda url, *a, **kw: self.fake_response
|
||||
+ self.requests.get.side_effect = (
|
||||
+ lambda url, *a, **kw: self.fake_response)
|
||||
+ self.requests.post.side_effect = (
|
||||
+ lambda url, *a, **kw: self.fake_response)
|
||||
|
||||
def tearDown(self):
|
||||
self.requests_patcher.stop()
|
||||
@@ -345,19 +345,14 @@ class ArchiverTestCase(TestCase):
|
||||
self.archiver._switchboard.queue_directory)), 1)
|
||||
self.assertEqual(len(self.archiver._switchboard.files), 1)
|
||||
|
||||
- def test_archive_message_unserializable(self):
|
||||
+ def test_archive_message_unserializable_raises_no_errors(self):
|
||||
+ self.fake_response = FakeResponse(200, {"url": "dummy"})
|
||||
msg = self._get_msg()
|
||||
msg["content-type"] = 'text/plain; charset="UTF-8"'
|
||||
msg.set_payload(b"this contains encoded unicode \xc3\xa9 \xc3\xa0")
|
||||
- # If you try to serialize this message to text, it will cause a:
|
||||
- # KeyError: 'content-transfer-encoding'
|
||||
+ # If you try to serialize this message to text, Mailman should be able
|
||||
+ # to prevent KeyError by ignoring the bad-characters.
|
||||
with patch("mailman_hyperkitty.logger") as logger:
|
||||
self.archiver.archive_message(self.mlist, msg)
|
||||
- # Check error log
|
||||
- self.assertEqual(logger.error.call_count, 1)
|
||||
- self.assertTrue(isinstance(
|
||||
- logger.error.call_args_list[0][0][2], KeyError))
|
||||
- # Check that the message is not stored in the spool.
|
||||
- self.assertEqual(len(os.listdir(
|
||||
- self.archiver._switchboard.queue_directory)), 0)
|
||||
- self.assertEqual(len(self.archiver._switchboard.files), 0)
|
||||
+ # Check no errors in the log.
|
||||
+ self.assertEqual(logger.error.call_count, 0)
|
||||
@@ -1,3 +1,11 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Nov 17 08:25:00 UTC 2021 - Andreas Schneider <asn@cryptomilk.org>
|
||||
|
||||
- Update to version 1.2.0
|
||||
* Update the authentication to call Hyperkitty using the API key as a part of
|
||||
Authorization HTTP header instead of url parameter.
|
||||
- Removed obsolete python-mailman-hyperkitty-reflect-changes-in-mailman-core.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue May 4 09:36:18 UTC 2021 - Ben Greiner <code@bnavigator.de>
|
||||
|
||||
|
||||
@@ -20,14 +20,12 @@
|
||||
# mailman is built only for primary python3 flavor
|
||||
%define pythons python3
|
||||
Name: python-mailman-hyperkitty
|
||||
Version: 1.1.0
|
||||
Version: 1.2.0
|
||||
Release: 0
|
||||
Summary: Mailman archiver plugin for HyperKitty
|
||||
License: GPL-3.0-only
|
||||
URL: https://gitlab.com/mailman/mailman-hyperkitty/
|
||||
Source: https://files.pythonhosted.org/packages/source/m/mailman-hyperkitty/mailman-hyperkitty-%{version}.tar.gz
|
||||
# https://gitlab.com/mailman/mailman-hyperkitty/commit/84e05811fb71aa105fd85fd14399bff813ed744d
|
||||
Patch0: python-mailman-hyperkitty-reflect-changes-in-mailman-core.patch
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
@@ -55,8 +53,7 @@ Obsoletes: python38-mailman-hyperkitty < %{version}-%{release}
|
||||
Mailman archiver plugin for HyperKitty
|
||||
|
||||
%prep
|
||||
%setup -q -n mailman-hyperkitty-%{version}
|
||||
%patch0 -p1
|
||||
%autosetup -n mailman-hyperkitty-%{version} -p1
|
||||
|
||||
%build
|
||||
%python_build
|
||||
|
||||
Reference in New Issue
Block a user