diff --git a/ietf/group/tests.py b/ietf/group/tests.py index 0ac1da8ef..9f783186d 100644 --- a/ietf/group/tests.py +++ b/ietf/group/tests.py @@ -1,10 +1,28 @@ +import os +from unittest import skipIf +from django.conf import settings from django.core.urlresolvers import reverse as urlreverse +from django.db.models import Q +from django.test import Client -from ietf.group.models import Role +from ietf.group.models import Role, Group from ietf.utils.test_data import make_test_data from ietf.utils.test_utils import login_testing_unauthorized, TestCase +if getattr(settings,'SKIP_DOT_TO_PDF', False): + skip_dot_to_pdf = True + skip_message = "settings.SKIP_DOT_TO_PDF = %s" % skip_dot_to_pdf +elif ( os.path.exists(settings.DOT_BINARY) and + os.path.exists(settings.UNFLATTEN_BINARY) and + os.path.exists(settings.PS2PDF_BINARY)): + skip_dot_to_pdf = False + skip_message = "" +else: + skip_dot_to_pdf = True + skip_message = ("One or more of the binaries for dot, unflatten and ps2pdf weren't found " + "in the locations indicated in settings.py.") + class StreamTests(TestCase): def test_streams(self): make_test_data() @@ -36,3 +54,30 @@ class StreamTests(TestCase): r = self.client.post(url, dict(delegates="ad2@ietf.org")) self.assertEqual(r.status_code, 302) self.assertTrue(Role.objects.filter(name="delegate", group__acronym=stream_acronym, email__address="ad2@ietf.org")) + + +@skipIf(skip_dot_to_pdf, skip_message) +class GroupTests(TestCase): + + def test_group_document_dependency_dotfile(self): + make_test_data() + for group in Group.objects.filter(Q(type="wg") | Q(type="rg")): + client = Client(Accept='application/pdf') + r = client.get(urlreverse("ietf.group.info.dependencies_dot", + kwargs=dict(acronym=group.acronym))) + self.assertTrue(r.status_code == 200, "Failed to receive " + "a dot dependency graph for group: %s"%group.acronym) + self.assertGreater(len(r.content), 0, "Dot dependency graph for group " + "%s has no content"%group.acronym) + + def test_group_document_dependency_pdffile(self): + make_test_data() + for group in Group.objects.filter(Q(type="wg") | Q(type="rg")): + client = Client(Accept='application/pdf') + r = client.get(urlreverse("ietf.group.info.dependencies_pdf", + kwargs=dict(acronym=group.acronym))) + self.assertTrue(r.status_code == 200, "Failed to receive " + "a pdf dependency graph for group: %s"%group.acronym) + self.assertGreater(len(r.content), 0, "Pdf dependency graph for group " + "%s has no content"%group.acronym) + diff --git a/ready-for-merge b/ready-for-merge index b84e63bf5..b8e56cdcf 100644 --- a/ready-for-merge +++ b/ready-for-merge @@ -1,12 +1,13 @@ -# By saying 'Ready for merge' in the commit message when you commit a change -# to your branch, the commit will be included in the merge list for the next -# release. However, if a commit for some reason haven't is missing that +# By saying 'Commit ready for merge' in the commit message when you commit a +# change to your branch, the commit will be included in the merge list for the +# next release. However, if a commit for some reason haven't is missing that # phrase in the commit comment, the branch and revision of the changeset can # be added to this file in trunk/ by the merge master, and it will also be # included in the merge list. # --- Add entries at the top --- +personal/willem/v5.12.4.dev0@9316 branch/iola/facelift-r8876@8970 Test crawler speed-up branch/iola/facelift-r8510@8733 personal/rcross/v5.7.3-dev0@8641