Description: fix the warning of datetime
 This patch adds the "tzinfo=timezone.utc" for datetime to make it as "aware datetime"
.
 Without the fix, there are warnings of receiving a naive datetime (2012-11-02 12:07:54)
 while time zone support is active.
.
Author: Rong Fu <rong.fu.cn@windriver.com>
Bug-Debian:
Reviewed-by:
Last-Update: 2025-04-29
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
Index: hyperkitty-1.3.12/hyperkitty/tests/models/test_email.py
===================================================================
--- hyperkitty-1.3.12.orig/hyperkitty/tests/models/test_email.py
+++ hyperkitty-1.3.12/hyperkitty/tests/models/test_email.py
@@ -22,7 +22,7 @@
 
 import os
 import tempfile
-from datetime import datetime
+from datetime import datetime, timezone
 from email import message_from_string
 from email.message import EmailMessage
 from mimetypes import guess_all_extensions
@@ -186,11 +186,11 @@ class EmailTestCase(TestCase):
     def test_as_message_folded_subject(self):
         sender = Sender(address="dummy@example.com")
         mlist = MailingList(name="list@example.com")
-        email = Email(archived_date=datetime(2012, 11, 2, 12, 7, 54),
+        email = Email(archived_date=datetime(2012, 11, 2, 12, 7, 54, tzinfo=timezone.utc),
                       timezone=0,
                       message_id="msgid",
                       sender=sender,
-                      date=datetime(2012, 11, 2, 12, 7, 54),
+                      date=datetime(2012, 11, 2, 12, 7, 54, tzinfo=timezone.utc),
                       mailinglist=mlist,
                       subject="This is a folded\n subject",
                       in_reply_to="<msg1.example.com>\n <msg2.example.com>",
@@ -204,12 +204,12 @@ class EmailTestCase(TestCase):
     def test_as_message_specials_in_name(self):
         sender = Sender(address="dummy@example.com")
         mlist = MailingList(name="list@example.com")
-        email = Email(archived_date=datetime(2012, 11, 2, 12, 7, 54),
+        email = Email(archived_date=datetime(2012, 11, 2, 12, 7, 54, tzinfo=timezone.utc),
                       timezone=0,
                       message_id="msgid",
                       sender=sender,
                       sender_name="Team: J.Q. Doe",
-                      date=datetime(2012, 11, 2, 12, 7, 54),
+                      date=datetime(2012, 11, 2, 12, 7, 54, tzinfo=timezone.utc),
                       mailinglist=mlist,
                       subject="Message subject",
                       content="Dummy message")
