diff --git a/ietf/feed_urls.py b/ietf/feed_urls.py index 95a9d50c1..c22d3aae3 100644 --- a/ietf/feed_urls.py +++ b/ietf/feed_urls.py @@ -2,7 +2,7 @@ from django.conf.urls import patterns, url from django.views.generic import RedirectView from ietf.doc.feeds import DocumentChangesFeed, InLastCallFeed -from ietf.wgcharter.feeds import GroupChangesFeed +from ietf.wginfo.feeds import GroupChangesFeed from ietf.iesg.feeds import IESGAgendaFeed from ietf.ipr.feeds import LatestIprDisclosuresFeed from ietf.liaisons.feeds import LiaisonStatementsFeed diff --git a/ietf/templates/wgcharter/feed_item_description.html b/ietf/templates/wginfo/feed_item_description.html similarity index 100% rename from ietf/templates/wgcharter/feed_item_description.html rename to ietf/templates/wginfo/feed_item_description.html diff --git a/ietf/utils/test_runner.py b/ietf/utils/test_runner.py index 63ddd645a..cdcd0647f 100644 --- a/ietf/utils/test_runner.py +++ b/ietf/utils/test_runner.py @@ -121,7 +121,7 @@ def check_url_coverage(): # skip some patterns that we don't bother with def ignore_pattern(regex, pattern): import django.views.static - return (regex in ("^_test500/$",) + return (regex in ("^_test500/$", "^accounts/testemail/$") or regex.startswith("^admin/") or getattr(pattern.callback, "__name__", "") == "RedirectView" or getattr(pattern.callback, "__name__", "") == "TemplateView" diff --git a/ietf/wgcharter/feeds.py b/ietf/wginfo/feeds.py similarity index 96% rename from ietf/wgcharter/feeds.py rename to ietf/wginfo/feeds.py index 799a2f796..f36273c2e 100644 --- a/ietf/wgcharter/feeds.py +++ b/ietf/wginfo/feeds.py @@ -14,7 +14,7 @@ from ietf.doc.models import DocEvent class GroupChangesFeed(Feed): feed_type = Atom1Feed - description_template = "wgcharter/feed_item_description.html" + description_template = "wginfo/feed_item_description.html" def get_object(self, request, acronym): return Group.objects.get(acronym=acronym) diff --git a/ietf/wginfo/tests.py b/ietf/wginfo/tests.py index f49b92a35..0baf5ec95 100644 --- a/ietf/wginfo/tests.py +++ b/ietf/wginfo/tests.py @@ -1,35 +1,3 @@ -# Portions Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. Contact: Pasi Eronen -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# -# * Neither the name of the Nokia Corporation and/or its -# subsidiary(-ies) nor the names of its contributors may be used -# to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - import os, unittest, shutil, calendar from django.conf import settings @@ -210,6 +178,28 @@ class GroupPagesTests(TestCase): self.assertEqual(r.status_code, 200) self.assertTrue(e.desc in r.content) + def test_feed(self): + draft = make_test_data() + group = draft.group + + ge = GroupEvent.objects.create( + group=group, + desc="Something happened.", + type="added_comment", + by=Person.objects.get(name="(System)")) + + de = DocEvent.objects.create( + doc=group.charter, + desc="Something else happened.", + type="added_comment", + by=Person.objects.get(name="(System)")) + + r = self.client.get("/feed/group-changes/%s/" % group.acronym) + self.assertEqual(r.status_code, 200) + self.assertTrue(ge.desc in r.content) + self.assertTrue(de.desc in r.content) + + class GroupEditTests(TestCase): def setUp(self): self.charter_dir = os.path.abspath("tmp-charter-dir")