Merge ~cjwatson/launchpad:fix-announcement-doctest into launchpad:master

Proposed by Colin Watson
Status: Merged
Approved by: Colin Watson
Approved revision: 27f6e46f31f25ccebbe56a372a66c7c7f8e7b2c5
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~cjwatson/launchpad:fix-announcement-doctest
Merge into: launchpad:master
Diff against target: 24 lines (+5/-1)
1 file modified
lib/lp/registry/stories/announcements/xx-announcements.txt (+5/-1)
Reviewer Review Type Date Requested Status
Colin Watson (community) Approve
Review via email: mp+413504@code.launchpad.net

Commit message

Fix hardcoded future date in doctest

To post a comment you must log in.
Revision history for this message
Colin Watson (cjwatson) wrote :

Self-approving (trivial test-only fix).

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/lib/lp/registry/stories/announcements/xx-announcements.txt b/lib/lp/registry/stories/announcements/xx-announcements.txt
index a1a704c..8623b80 100644
--- a/lib/lp/registry/stories/announcements/xx-announcements.txt
+++ b/lib/lp/registry/stories/announcements/xx-announcements.txt
@@ -6,6 +6,10 @@ list is available as a portlet on the project home page, as well as on a
6dedicated batched page showing all announcements, and as an RSS/Atom6dedicated batched page showing all announcements, and as an RSS/Atom
7news feed.7news feed.
88
9 >>> from datetime import (
10 ... datetime,
11 ... timedelta,
12 ... )
9 >>> import feedparser13 >>> import feedparser
10 >>> from lp.services.beautifulsoup import (14 >>> from lp.services.beautifulsoup import (
11 ... BeautifulSoup,15 ... BeautifulSoup,
@@ -202,7 +206,7 @@ date in the future when the announcement will be made:
202 >>> priv_browser.getControl('specific date and time').click()206 >>> priv_browser.getControl('specific date and time').click()
203 >>> priv_browser.getControl(207 >>> priv_browser.getControl(
204 ... name='field.publication_date.announcement_date').value = (208 ... name='field.publication_date.announcement_date').value = (
205 ... '2021-12-24 09:00:00')209 ... datetime.now() + timedelta(days=1)).isoformat()
206 >>> priv_browser.getControl('Make announcement').click()210 >>> priv_browser.getControl('Make announcement').click()
207 >>> print(priv_browser.title)211 >>> print(priv_browser.title)
208 Jokosher in Launchpad212 Jokosher in Launchpad

Subscribers

People subscribed via source and target branches

to status/vote changes: