Skip to content

Commit 86f2bae

Browse files
committed
Move group feed from wgcharter (where it historically ended up) to wginfo, add test
- Legacy-Id: 7086
1 parent 7dcaed4 commit 86f2bae

5 files changed

Lines changed: 25 additions & 35 deletions

File tree

ietf/feed_urls.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from django.views.generic import RedirectView
33

44
from ietf.doc.feeds import DocumentChangesFeed, InLastCallFeed
5-
from ietf.wgcharter.feeds import GroupChangesFeed
5+
from ietf.wginfo.feeds import GroupChangesFeed
66
from ietf.iesg.feeds import IESGAgendaFeed
77
from ietf.ipr.feeds import LatestIprDisclosuresFeed
88
from ietf.liaisons.feeds import LiaisonStatementsFeed
File renamed without changes.

ietf/utils/test_runner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ def check_url_coverage():
121121
# skip some patterns that we don't bother with
122122
def ignore_pattern(regex, pattern):
123123
import django.views.static
124-
return (regex in ("^_test500/$",)
124+
return (regex in ("^_test500/$", "^accounts/testemail/$")
125125
or regex.startswith("^admin/")
126126
or getattr(pattern.callback, "__name__", "") == "RedirectView"
127127
or getattr(pattern.callback, "__name__", "") == "TemplateView"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
class GroupChangesFeed(Feed):
1616
feed_type = Atom1Feed
17-
description_template = "wgcharter/feed_item_description.html"
17+
description_template = "wginfo/feed_item_description.html"
1818

1919
def get_object(self, request, acronym):
2020
return Group.objects.get(acronym=acronym)

ietf/wginfo/tests.py

Lines changed: 22 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,3 @@
1-
# Portions Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
2-
# All rights reserved. Contact: Pasi Eronen <pasi.eronen@nokia.com>
3-
#
4-
# Redistribution and use in source and binary forms, with or without
5-
# modification, are permitted provided that the following conditions
6-
# are met:
7-
#
8-
# * Redistributions of source code must retain the above copyright
9-
# notice, this list of conditions and the following disclaimer.
10-
#
11-
# * Redistributions in binary form must reproduce the above
12-
# copyright notice, this list of conditions and the following
13-
# disclaimer in the documentation and/or other materials provided
14-
# with the distribution.
15-
#
16-
# * Neither the name of the Nokia Corporation and/or its
17-
# subsidiary(-ies) nor the names of its contributors may be used
18-
# to endorse or promote products derived from this software
19-
# without specific prior written permission.
20-
#
21-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22-
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23-
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24-
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25-
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26-
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27-
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28-
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29-
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30-
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31-
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32-
331
import os, unittest, shutil, calendar
342

353
from django.conf import settings
@@ -210,6 +178,28 @@ def test_history(self):
210178
self.assertEqual(r.status_code, 200)
211179
self.assertTrue(e.desc in r.content)
212180

181+
def test_feed(self):
182+
draft = make_test_data()
183+
group = draft.group
184+
185+
ge = GroupEvent.objects.create(
186+
group=group,
187+
desc="Something happened.",
188+
type="added_comment",
189+
by=Person.objects.get(name="(System)"))
190+
191+
de = DocEvent.objects.create(
192+
doc=group.charter,
193+
desc="Something else happened.",
194+
type="added_comment",
195+
by=Person.objects.get(name="(System)"))
196+
197+
r = self.client.get("/feed/group-changes/%s/" % group.acronym)
198+
self.assertEqual(r.status_code, 200)
199+
self.assertTrue(ge.desc in r.content)
200+
self.assertTrue(de.desc in r.content)
201+
202+
213203
class GroupEditTests(TestCase):
214204
def setUp(self):
215205
self.charter_dir = os.path.abspath("tmp-charter-dir")

0 commit comments

Comments
 (0)