File: 0001-Fix-timezone-names-in-tests.patch

package info (click to toggle)
python-django-ical 1.9.2-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 308 kB
  • sloc: python: 1,307; makefile: 136
file content (61 lines) | stat: -rw-r--r-- 2,868 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
From: Michael Fladischer <fladi@debian.org>
Date: Mon, 9 Mar 2026 13:45:44 +0000
Subject: Fix timezone names in tests.

---
 django_ical/tests/test_feed.py | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/django_ical/tests/test_feed.py b/django_ical/tests/test_feed.py
index 4d45348..af78bbc 100644
--- a/django_ical/tests/test_feed.py
+++ b/django_ical/tests/test_feed.py
@@ -433,8 +433,8 @@ class ICal20FeedTest(TestCase):
         self.assertEqual(calendar["X-WR-TIMEZONE"], "Asia/Tokyo")
 
     def test_timezone(self):
-        tokyo = tz.gettz("Asia/Tokyo")  # or JST or Japan Standard Time
-        us_eastern = tz.gettz("US/Eastern")  # or EDT or Eastern (Daylight) Time
+        tokyo = tz.gettz("Asia/Tokyo")
+        new_york = tz.gettz("America/New_York")
 
         class TestTimezoneFeed(TestItemsFeed):
             def items(self):
@@ -456,8 +456,8 @@ class ICal20FeedTest(TestCase):
                         "title": "Title2",
                         "description": "Description2",
                         "link": "/event/2",
-                        "start": datetime(2012, 5, 6, 18, 00, tzinfo=us_eastern),
-                        "end": datetime(2012, 5, 6, 20, 00, tzinfo=us_eastern),
+                        "start": datetime(2012, 5, 6, 18, 00, tzinfo=new_york),
+                        "end": datetime(2012, 5, 6, 20, 00, tzinfo=new_york),
                         "recurrences": {
                             "rrules": [],
                             "xrules": [],
@@ -477,22 +477,22 @@ class ICal20FeedTest(TestCase):
         self.assertEqual(
             calendar.subcomponents[0]["DTSTART"].to_ical(), b"20120501T180000"
         )
-        self.assertEqual(calendar.subcomponents[0]["DTSTART"].params["TZID"], "JST")
+        self.assertEqual(calendar.subcomponents[0]["DTSTART"].params["TZID"], "Asia/Tokyo")
 
         self.assertEqual(
             calendar.subcomponents[0]["DTEND"].to_ical(), b"20120501T200000"
         )
-        self.assertEqual(calendar.subcomponents[0]["DTEND"].params["TZID"], "JST")
+        self.assertEqual(calendar.subcomponents[0]["DTEND"].params["TZID"], "Asia/Tokyo")
 
         self.assertEqual(
             calendar.subcomponents[1]["DTSTART"].to_ical(), b"20120506T180000"
         )
-        self.assertEqual(calendar.subcomponents[1]["DTSTART"].params["TZID"], "EDT")
+        self.assertEqual(calendar.subcomponents[1]["DTSTART"].params["TZID"], "America/New_York")
 
         self.assertEqual(
             calendar.subcomponents[1]["DTEND"].to_ical(), b"20120506T200000"
         )
-        self.assertEqual(calendar.subcomponents[1]["DTEND"].params["TZID"], "EDT")
+        self.assertEqual(calendar.subcomponents[1]["DTEND"].params["TZID"], "America/New_York")
 
     def test_file_name(self):
         request = RequestFactory().get("/test/ical")